Variables
#4

I don't know why you are creating a new variable called "litai", if you are gonna store the exact values in Myrelitai for that, but you must simply use the other variable for that. No need to create a new one.
pawn Код:
if(Myrelitai > 99) {DuotiLitu(playerid, 100);} // if money is more than 99 so we give player 100.
      else if(Myrelitai < 100) // else if money is less than 100, then...
      {
          new lits; // we declare new variable
          lits = 100 - Myrelitai; // set its value tu 100-'litai', because 'litai' is greater than 100
          DuotiLitu(playerid, lits); // and we give player money amount named 'lits'
      }
Should work, cause you get errors for doing weird stuff with the new variable
Reply


Messages In This Thread
Variables - by kamiliuxliuxliux - 16.06.2014, 18:18
Re: Variables - by Eth - 16.06.2014, 18:31
Re: Variables - by kamiliuxliuxliux - 16.06.2014, 18:49
Re: Variables - by NaClchemistryK - 16.06.2014, 19:47
Re: Variables - by kamiliuxliuxliux - 16.06.2014, 21:19

Forum Jump:


Users browsing this thread: 1 Guest(s)