Posted 14 July 2016 - 11:15 PM
Sorry for the iffy explanation, but I currently have an issue with my monitors showing the MFSU values with exponents instead of a whole number, ex(3.8659811E7 instead of the usual 38659811. http://imgur.com/1g9B9jL)
I had it working fine before, but I edited some of my code and I'm not sure what I've done wrong to make it do this. When I enter the commands below, I get the actual value I should be getting without the exponent so I assume it is somewhere in the code that is making it do that:
I will paste the whole program I made below, I don't see anything wrong with it but I am also doing this for my first time so I could be missing something. Thanks in advance to the people who help.exit()
Also, is there a way to copy the code from the computer to my clipboard? I wrote this whole thing out myself and there might be an easier way that I don't know of.
I had it working fine before, but I edited some of my code and I'm not sure what I've done wrong to make it do this. When I enter the commands below, I get the actual value I should be getting without the exponent so I assume it is somewhere in the code that is making it do that:
>lua p = peripheral.wrap("mfsu_0")
>lua p.getEUStored()
38659811
I will paste the whole program I made below, I don't see anything wrong with it but I am also doing this for my first time so I could be missing something. Thanks in advance to the people who help.exit()
m = peripheral.wrap("monitor_0")
p = peripheral.wrap("mfsu_0")
while true do
m.clear()
m.setTextScale(2)
m.setTextColor(colors.red)
m.setCursorPos(1,1)
m.write("MFSU STATUS")
m.setTextColor(colors.yellow)
m.setCursorPos(1,3)
m.write("Max Capacity: ")
m.setTextColor(colors.green)
m.write(p.getEUCapacity())
m.setTextColor(colors.yellow)
m.setCursorPos(1,4)
m.write("Current Capacity: ")
m.setTextColor(colors.green)
m.write("p.getEUStored())
m.setTextColor(colors.yellow)
m.setCursorPos(1,5)
m.write("Current Load: ")
m.setTextColor(colors.green)
m.write(p.getEUOutputPerTick())
sleep(0.5)
end
Also, is there a way to copy the code from the computer to my clipboard? I wrote this whole thing out myself and there might be an easier way that I don't know of.