I'm pretty new to Love2d and have done a lot of guessing, but can somebody tell me what's wrong with this?
I'm getting the error: '=' expected near 'player'
From this code:
If player.x > 200 and
player.x < 1080 then
player.x = getMouse.x(dt)
end
'=' expected near 'player'
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: '=' expected near 'player'
If you use the
Code: Select all
tags on the forums, the formatting will be preserved. The problem seems to be, however, that you wrote 'if' as 'If'.
Re: '=' expected near 'player'
nope, its an i
did you define the function getMouse.x?
did you define the function getMouse.x?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: '=' expected near 'player'
I did write an I, just a capital one.
- Jasoco
- Inner party member
- Posts: 3728
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: '=' expected near 'player'
The point is, if the code in the OP is exact, bartbes is right. You capitalized the word "if". (Lua is case sensitive)
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests