This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Klitri's profile picture

(Question) I'm having an issue with math.. (CC 1.5.2)

Started by Klitri, 08 June 2013 - 11:01 AM
Klitri #1
Posted 08 June 2013 - 01:01 PM
Okay so, I'm making an advanced power system using vanilla redstone, all I need now is to add the ability to "stack up" on power, like a battery, I know how to do it, but it won't let me. It either says that it's "got an unexpected symbol" or something about "Ambigous statement of x" or something, and I just want to know if someone could quickly see my code, tell me how I can add in this charging ability.



Total = 0 --Useless right now.
repeat
Input = redstone.getAnalogInput("right")
Total = redstone.getAnalogOutput("left")
redstone.setAnalogOutput("left",Input)
print("Current Input is)print(Input)
print("Current Output is")print(Output)
print("Current Power is")print(Total)
1+Total --Point of issue
--Comment here--
sleep(1)
term.clear()
term.setCursorPos(1,1)
until nil
CountJankula #2
Posted 08 June 2013 - 01:16 PM
Total = Total + 1

should work
Klitri #3
Posted 08 June 2013 - 01:32 PM
Thanks!