02.08.2017, 18:26
Hello SA:MP Community
I come from Liberty Unleashed ( A Grand Theft Auto III Multiplayer ) I was scripting there in squirrel, and now i see samp ( im new here ), and started to script my very first script in pawn here.
I created an array
I'm getting a error while i try to compile (expected token string end but found identifier) in that MessagePlayer line as you can see. The MessagePlayer works normally, the error appears in that PlayerHealth array
What did i do wrong?
I come from Liberty Unleashed ( A Grand Theft Auto III Multiplayer ) I was scripting there in squirrel, and now i see samp ( im new here ), and started to script my very first script in pawn here.
I created an array
Код:
new PlayerHealth[100]; new PlayerArmour[100]; stock MessagePlayer(message[],playerid) { SendClientMessage(playerid,0xFFFFFFFF,message); } public OnPlayerCommandText(playerid, cmdtext[]) { if ( strcmp("/health" ,cmdtext,true,10)==0) { MessagePlayer("Your health in array: "+PlayerHealth[playerid],playerid); // HERE ERROR expected token string end but found identifier } } public OnPlayerUpdate(playerid) { PlayerHealth[playerid] = GetPlayerHealth(playerid); PlayerArmour[playerid] = GetPlayerArmour(playerid); }
What did i do wrong?