argument help
#1

Код:
C:\DOCUME~1\bob\Desktop\Ls-Dm\GAMEMO~1\ld.pwn(2835) : error 035: argument type mismatch (argument 2)
pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
    new string[128];
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "Info: %s Has Left The Server.", pname);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
i have try to fix it but still dont know whats worng >.<
Reply
#2

Why do you have this? GameTextForPlayer(playerid,"~g~Welcome ~y~To ~r~S",2000,5); when the player disconnects? lol, remove it and compile
Reply
#3

the same the error still
Reply
#4

This works just fine for me. Are you sure the error is in that code?
Reply
#5

Код:
public OnPlayerDisconnect(playerid, reason)
{
    new
        string[64],
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s left Stunt Planet. (Crashed)",name);
        case 1: format(string,sizeof string,"%s left Stunt Planet. (Leaving)",name);
        case 2: format(string,sizeof string,"%s left Stunt Planet. (Kicked/Banned)",name);
    }
    SendClientMessageToAll(COLOR_LIGHTBLUE,string);
	return 1;
}
Remove Crashed, Kick/banned if u want!
Reply
#6

the same ! the error still
Reply
#7

Quote:
Originally Posted by X_Boy
Посмотреть сообщение
the same ! the error still
Include/Plugin missing, Or some updated missing.
Reply
#8

This code is just perfect. Uh! CTRL+G, enter 2835, copy the whole line then post it here because I'm sure those are not the lines of the error.
Reply
#9

problem fixed ty guys
Reply
#10

Mind telling us your solution.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)