SA-MP Forums Archive
Need some quick 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: Need some quick help! (/showthread.php?tid=493284)



Need some quick help! - whando - 07.02.2014

I get the error 035: argument type mismatch (argument 2) error at the line in my public, how to fix it? I really can't figure it out, thanks for your help already!!

Код:
forward hidetextdraw(playerid);

public hidetextdraw(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw69); // << Error line. error 035: argument type mismatch (argument 2)
    return 1;
}
Код:
YCMD:sethp(playerid, params[], help)
{
	if(help) return SCM(playerid, COLOR_GREY, "Not supported");

    new string[128], playa, health;
    if(sscanf(params, "ud", playa, health))
	{
        SCM(playerid, COLOR_GRAD, "USAGE:  /sethp [playerid] [health]");
        return 1;
    }
    if (PlayerInfo[playerid][pAdmin] >= 4) {
    	if(IsPlayerConnected(playa))
		{
            if(playa != INVALID_PLAYER_ID)
			{
                SetPlayerHealth(playa, health);
                format(string, sizeof(string), "> You have set %s's health to %d.", GetPlayerNameEx(playa), health);
                SCM(playerid, COLOR_BLUE, string);
                format(string, sizeof(string), "> Admin %s has set your health to %d.", GetPlayerNameEx(playerid), health);
                SCM(playa, COLOR_BLUE, string);
            }
        }
        else SCM(playerid, COLOR_GRAD1, "Invalid player specified.");
    }
    else {
        format(string,sizeof(string),"~n~~n~~w~You cannot use this command.");
		TextDrawSetString(Textdraw69[playerid],string);
		TextDrawShowForPlayer(playerid, Textdraw69[playerid]);
		SetTimer("hidetextdraw", 4000, false);
    }
    return 1;
}



Respuesta: Need some quick help! - iNetX - 07.02.2014

pawn Код:
forward hidetextdraw(playerid);

public hidetextdraw(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw69[playerid]);
    return 1;
}



Re: Need some quick help! - whando - 08.02.2014

Oh I forgot that!!:P, thanks!