Jump to content




[Error] Trouble with "while condition do"


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

#1 Sscchhmueptfter

  • New Members
  • 1 posts

Posted 12 February 2013 - 11:24 PM

Title: [Error] Trouble with "while condition do"

Hello, the following program results in the error "bios:338: [string "startup"]:5: 'do' expected" and i'm unable to fix it. Changing line 5 to "while 1=1 do" still yielded the same error message. Any ideas why?

edit: Finally figured this out, it needed to be "==" instead of "=". But I still have no idea why, shouldn't "integer=integer" be true or false?
Spoiler


#2 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 13 February 2013 - 02:47 AM

When you are comparing two variables, then you need to use the '==' operation. When you are assigning a new variable, you use the '=' operation.

#3 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 13 February 2013 - 05:42 AM

Edit: nvm. Listen to Cranium.

Edited by InputUsername, 13 February 2013 - 05:44 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users