SA-MP Forums Archive
argument help - 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: argument help (/showthread.php?tid=365650)



argument help - DarkB0y - 03.08.2012

Код:
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 >.<


Respuesta: argument help - HarlemSAMP - 03.08.2012

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


Re: argument help - DarkB0y - 03.08.2012

the same the error still


Re: argument help - Vince - 03.08.2012

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


Re: argument help - Majed - 03.08.2012

Код:
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!


Re: argument help - DarkB0y - 03.08.2012

the same ! the error still


Re: argument help - Majed - 03.08.2012

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


Re: argument help - [KHK]Khalid - 03.08.2012

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.


Re: argument help - DarkB0y - 03.08.2012

problem fixed ty guys


Re: argument help - Kingunit - 03.08.2012

Mind telling us your solution.