SA-MP Forums Archive
error 001: expected token: ";", but found "-identifier-" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 001: expected token: ";", but found "-identifier-" (/showthread.php?tid=500480)



error 001: expected token: ";", but found "-identifier-" - ChristianIvann09 - 13.03.2014

Код:
TutorialProgress[playerid] = 0;
Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(60197) : error 001: expected token: ";", but found "-identifier-"
and how to fix this warning?
Код:
SendClientMessage(playerid, COLOR_WHITE, "You have successfully force out %s in tutorial", GetPlayerNameEx(giveplayerid));
Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP \gamemodes\ASRP_V2.0.pwn(10913) : warning 202: number of arguments does not match definition



Re: error 001: expected token: ";", but found "-identifier-" - Ardenshy - 13.03.2014

Function SendClientMessage have only 3 parametres but your function have 4 parametres. Use function format above function SendClientMessage.
pawn Код:
//For First Declare New Variable
new String[/*Variable Size*/];
//Now Formatting
format(String,sizeof(String),"Formatted Message",/*Other Variables Or Functions*/);
//Now Send Formatted Message To Player
SendClientMessage(PlayerID,Color,String);



Re: error 001: expected token: ";", but found "-identifier-" - Ruben_Alonso - 13.03.2014

The first error, must be an error from the line above that one, and the second one, you must format the string in order to use it on SendClientMessage if you want to call a value from the outside...

Example:

pawn Код:
new string[70]; // That's the max of your string, if you change the text make sure u raise/decrease this value
format(string, 70, "You have successfully force out %s in tutorial", GetPlayerNameEx(giveplayerid));
SendClientMessage(playerid, COLOR_WHITE, string);



Re: error 001: expected token: ";", but found "-identifier-" - AnonScripter - 13.03.2014

pawn Код:
new string[256];
format(string, sizeof(string), "You have successfully force out %s in tutorial", GetPlayerNameEx(giveplayerid));
SendClientMessage(playerid, COLOR_WHITE, string);