Jump to content

Help with variable decreasing.


Feche1320

Recommended Posts

Posted

Okay, I have this:

  
Ranking-- 

It should decrease the variable value, if that variable is 5, it should go to 4, but it gives me a warning, and the hole script doesn't load.

This is what it says:

'=' expected near '-' 

I also tried:

  
Ranking = Ranking-1 

But the same error..

Thanks

Posted

Lua doesn't support ++/-- operators, as i recall.

Ranking = Ranking-1 

this shouldn't give any errors, unless Ranking variable is nil or not a number.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...