[Scripting Problem] Warning on Pawno: NAMEGET(playerid) - 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: [Scripting Problem] Warning on Pawno: NAMEGET(playerid) (
/showthread.php?tid=530284)
[Scripting Problem] Warning on Pawno: NAMEGET(playerid) -
MaxTuner - 06.08.2014
Hello dear Scripters! I've got a little problem with Pawno! Here's the piece of code:
Код:
SendClientMessage(playerid, COLOR_BLUE, "Esi sveicināts Defaq %s!",NAMEGET(playerid));
And here's the NameGet stock function:
Код:
stock NAMEGET(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
Finally the warning:
Код:
warning 202: number of arguments does not match definition
I have no clue what's the problem!
Re: [Scripting Problem] Warning on Pawno: NAMEGET(playerid) -
SpikY_ - 06.08.2014
Maxtuner .. no problem .. your script is now compiled .. when ever i get warning i dnt concentrate on tht warning instead of error
Re: [Scripting Problem] Warning on Pawno: NAMEGET(playerid) -
Threshold - 06.08.2014
You're trying to send a formatted message using SendClientMessage instead of format.
pawn Код:
new fstr[50];
format(fstr, sizeof(fstr), "Esi sveicināts Defaq %s!", NAMEGET(playerid));
SendClientMessage(playerid, COLOR_BLUE, fstr);
Re: [Scripting Problem] Warning on Pawno: NAMEGET(playerid) -
MaxTuner - 06.08.2014
Quote:
Originally Posted by NGEN123
Maxtuner .. no problem .. your script is now compiled .. when ever i get warning i dnt concentrate on tht warning instead of error
|
I know, but this warning did crash whole server!
Quote:
Originally Posted by Threshold
You're trying to send a formatted message using SendClientMessage instead of format.
pawn Код:
new fstr[50]; format(fstr, sizeof(fstr), "Esi sveicināts Defaq %s!", NAMEGET(playerid)); SendClientMessage(playerid, COLOR_BLUE, fstr);
|
Thanks! It did worked!
![Smiley](images/smilies/smile.png)
Maybe this was dumb, but I'm new to Pawno
![Smiley](images/smilies/smile.png)
+Repped