Where does this go wrong?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
haxx_blaster
Posts: 13
Joined: Fri Jan 20, 2006 4:21 pm

Where does this go wrong?

Post by haxx_blaster »

I want to regulate my speed settings so it can't go past 20 or 1, but it ends up that i can't change the speed during the game.
Please help me out.

Code: Select all

         if speed >= 0 then
         speed = 1
         end

         if speed >= 21 then
         speed = 20
         end
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

First line should be <=
haxx_blaster
Posts: 13
Joined: Fri Jan 20, 2006 4:21 pm

Post by haxx_blaster »

Thank you very much. :)
Post Reply