Hi, I have come across an error that doesn't make sense.
It is asking me for an = on line 11
Here is the pastebin
that's all there is to it
Thanks!
1
Big Reactors Control Panel
Started by Hydrotronics, Nov 08 2015 07:24 PM
8 replies to this topic
#1
Posted 08 November 2015 - 07:24 PM
#2
Posted 08 November 2015 - 07:39 PM
reactor.doEjectWaste should be a function call
you need to add () on the end
you need to add () on the end
Edited by Lupus590, 08 November 2015 - 07:39 PM.
#4
Posted 08 November 2015 - 08:22 PM
Definitely include a (). Maybe it wasn't in the documentation because they are referring to the function, not to what it returns.
PS: 1400th post!
PS: 1400th post!
Edited by Creator, 08 November 2015 - 08:22 PM.
#5
Posted 08 November 2015 - 09:37 PM
Just wanted to point out - you aren't calling any of the functions. If it's a function, you must call it. For example, a function will never equal 10000000.
#6
Posted 08 November 2015 - 11:43 PM
... and without a () on the end of the function reference, you aren't calling it.
http://lua-users.org...nctionsTutorial
http://lua-users.org...nctionsTutorial
#7
Posted 10 December 2015 - 05:23 PM
ok because what I am trying to do it get the value of the say amount of energy stored in the reactor, then decide whether to insert fuel, activate reactor or remain on stand by
Edit: and the max amount of energy stored in the reactor's buffer is 10000000.
Edit: and the max amount of energy stored in the reactor's buffer is 10000000.
Edited by Hydrotronics, 10 December 2015 - 05:31 PM.
#8
Posted 10 December 2015 - 08:48 PM
What Yami meant is that the function itself cannot equal 1000000, however what the function RETURNS after you call it, CAN.
local function getEnergy() return 20 end print(getEnergy == 20) print(getEnergy() == 20)
Edited by Dragon53535, 10 December 2015 - 08:48 PM.
#9
Posted 21 December 2015 - 05:01 PM
I got it working
All I needed to do to get the numbers out was do math.floor()
I got it working now
All I needed to do to get the numbers out was do math.floor()
I got it working now
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users