Jump to content




[Error] bios:338: [string "CMD"]:4: '=' expected


  • You cannot reply to this topic
2 replies to this topic

#1 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 16 January 2013 - 03:59 PM

I have no idea what I am doing wrong, but whenever I use loop in something the program keeps telling me that error in the title.
here is the code I have.
overide = "overide"
passcode = "passcode"
loop
term.clear()
term.setCursorPos(1,1)
print("Tangent Lock 3.0")
write("input:  ")
input = read("*")
if input ~= passcode then
print("Incorrect Passcode")
sleep(1)
end
until input == passcode or input == overide
print("Passcode Accepted!")
sleep(1)
term.clear()
term.setCursorPos(1,1)


#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 January 2013 - 04:08 PM

Could have just left the topic where it was... a moderator would have moved it...

now the problem it has is that the word "loop" doesn't exist... so it was expecting you to assign something to it... loops are as follows

While loop:
while <conditional is true> do
  -- code in here
end

Repeat loop
repeat
  -- code in here
until <conditional is true>

For loop
for num = 1, <number of times to loop> do
  -- code in here
end


#3 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 16 January 2013 - 04:13 PM

Ah thats why.
my fault teehee.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users