problem!
#1

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
Reply
#2

hmm witch is line 84?
Reply
#3

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;
 }
Reply
#4

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;
    }

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)