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

Bios:206[string "platformer"]:13: 'then' expected

Started by ShadeOfBlack, 07 September 2012 - 07:58 PM
ShadeOfBlack #1
Posted 07 September 2012 - 09:58 PM
I have an "if" statement im not sure why its not working

Here is my code that gets the error:

if x==pX && y==pY then
...
Am I not using the and operator correctly?
Cloudy #2
Posted 07 September 2012 - 10:00 PM
&& doesn't exist in Lua. The and operator is "and".
ShadeOfBlack #3
Posted 07 September 2012 - 10:19 PM
Oh that makes since! Thanks a lot!