Help Please! +ReP! - 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: Help Please! +ReP! (
/showthread.php?tid=476005)
Help Please! +ReP! -
TahaAsif12 - 16.11.2013
Код:
C:\Users\12123232\Desktop\myGM\gamemodes\grandlarc.pwn(135) : error 001: expected token: ";", but found "-identifier-"
Line 135:
Код:
format(string, sizeof(string), "You have set %s's virtual world to %d.");
PLease Help Me!
Re: Help Please! +ReP! -
SilentSoul - 16.11.2013
pawn Код:
new string[126],targetid;
format(string, sizeof(string), "You have set %s's virtual world to %d.",GetPlayerNameEx(targetid),GetPlayerVirtualWorld(targetid));
//sendclientmessage or dialog with string..
Also add this anywhere in your script
pawn Код:
stock GetPlayerNameEx(playerid)
{
new pName[25];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
Re: Help Please! +ReP! -
prince2 - 16.11.2013
read this link below after reading you will know how to use it properly if u need more help tell me
https://sampwiki.blast.hk/wiki/Format
Re: Help Please! +ReP! -
Areax - 16.11.2013
Show one line above.
Re: Help Please! +ReP! -
newbie scripter - 16.11.2013
Read And Learn
Re: Help Please! +ReP! -
Areax - 16.11.2013
The problem is line 134. He just forgot to write "
;" at the end of the line 134.
Re: Help Please! +ReP! -
SilentSoul - 16.11.2013
Quote:
Originally Posted by Areax
The problem is line 134. He just forgot to write ";" at the end of the line 134.
|
Right , and he didn't format the string correctly so i gave him full code.
Re: Help Please! +ReP! -
newbie scripter - 16.11.2013
Quote:
Originally Posted by Areax
The problem is line 134. He just forgot to write ";" at the end of the line 134.
|
Yours answer is right, he missed ';' and also what valuse must %s & %d be
Re: Help Please! +ReP! -
Areax - 16.11.2013
if he just do like
pawn Код:
format(string, sizeof(string), "You have set %s's virtual world to %d.");
He won't get any error.
Re: Help Please! +ReP! -
newbie scripter - 16.11.2013
Are you sure??
EDIT:: ya no errors maybe but he will recieve %s instead of their name