problem! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem! (
/showthread.php?tid=126350)
problem! -
[WF]Demon - 08.02.2010
everytime i compile this
Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
{
new string[64];
format(string, sizeof(string), "%d Is AFK Do not kill him/her!", GetPlayerName(playerid, string));
TogglePlayerControllable(playerid, 1);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
i get
Код:
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(84) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
this i know its in GetPlayerName under new string[64]; if anyone can find out why i get this prob it would be great
Re: problem! -
Flake. - 08.02.2010
hmm witch is line 84?
Re: problem! -
mansonh - 08.02.2010
pawn Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
{
new string[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s(%d) Is AFK Do not kill him/her!", name, playerid );
TogglePlayerControllable(playerid, 1);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
Re: problem! -
Calgon - 08.02.2010
You can't use GetPlayerName in that way, nor can you use strings like that.
pawn Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
{
new string[ 64 ], Name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, Name, sizeof( Name ) );
format( string, sizeof( string ), "%s is AFK - They have been frozen to prevent being killed.", Name );
TogglePlayerControllable( playerid, false );
SendClientMessageToAll( COLOR_GREEN, string );
return 1;
}