Search found 2 matches
- Tue Mar 11, 2014 2:48 am
- Forum: Support and Development
- Topic: attempt to preform arithmetic on field "xvel" (a nil value)
- Replies: 2
- Views: 2052
Re: attempt to preform arithmetic on field "xvel" (a nil val
Yeah, thanks, shortly after posting this I found out the problems. Thanks anyway though.
- Mon Mar 10, 2014 12:41 am
- Forum: Support and Development
- Topic: attempt to preform arithmetic on field "xvel" (a nil value)
- Replies: 2
- Views: 2052
attempt to preform arithmetic on field "xvel" (a nil value)
I'm getting this error in my player.lua, inside my player.physics(dt), and I'm not really sure how to fix this with the error. function player.physics(dt) player.x = player.x + player.xvel * dt player.y = player.y + player.yvel * dt player.xvel = player.xvel * (1 - math.min(dt*friction, 1)) end I've...