04.07.2012, 22:29
Hello, I'm having the hardest time in the world grasping variables in pawno, they are much more complicated then other languages IMO.
How in the world do you define an int and a string? My guess is
Also, how do you use variables in functions for example
doesn't compile for me.
another thing I'm struggling to understand is having a variable for every player, I know you use MAX_PLAYERS for this but could someone dumb it down for me?
EDIT: Got it compiling by changing the the variables to
Are my variables ints because I set them to 0? are they strings if I don't set them to 0?
How in the world do you define an int and a string? My guess is
Код:
new pScore[3] = 0; //Int new pSkin[MAX_PLAYERS] //String
Код:
SetPlayerSkin(playerid, pSkin);
another thing I'm struggling to understand is having a variable for every player, I know you use MAX_PLAYERS for this but could someone dumb it down for me?
EDIT: Got it compiling by changing the the variables to
Код:
new pScore[MAX_PLAYERS] = 0; //Score new pSkin[MAX_PLAYERS] = 0; // Skin
Код:
SetPlayerSkin(playerid, pSkin[playerid]);