I'm trying to write a really simple program using the advanced computers and the miscperipherals chatbox.
Not working, really weird i'm using the if statement in it to check what the players says and if it says the right thing it will activate a door.
And i always get the error "bios:338 [string:jarvis]:3: 'then' expected.
Even if i make the most simple if program ever
if 1=1 then
print("ok")
end
I get the same darn error.
Is this a bug with the advanced computers
(Ps i'm using the ftb ultimate pack so CC and Miscperihperals from 1.4.7)
Any help would be handy.
If then bug?
Started by GyroW, Jul 13 2013 05:06 AM
5 replies to this topic
#1
Posted 13 July 2013 - 05:06 AM
#2
Posted 13 July 2013 - 05:29 AM
local TestBoolean = true
if TestBoolean then -- Is the same as if TestBoolean == true
print("Yay")
else
print("Naw")
end
#3
Posted 13 July 2013 - 05:33 AM
In lua, when you compare two things, you should use == instead of =
setting variables is done with a single =
if 1==1 then
print("ok")
end
setting variables is done with a single =
#4
Posted 13 July 2013 - 05:38 AM
Isn't that in every language the same?
#5
Posted 13 July 2013 - 05:44 AM
Thanks jan, i forgot about that
Sorry to bother you guys
Sorry to bother you guys
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












