SA-MP Forums Archive
Help please - 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: Help please (/showthread.php?tid=126353)



Help please - bartje01 - 08.02.2010

C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(597) : warning 225: unreachable code
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(597) : warning 217: loose indentation
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(59 : error 017: undefined symbol "dcmd"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(602) : warning 225: unreachable code
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(602) : error 017: undefined symbol "dcmd_heal"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(606) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


I've got that errors when I use this:
Код:
{
	dcmd(heal, 4, cmdtext);
	return 0;
}

dcmd_heal(playerid, params[])
{
	new
		id;
	if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
	else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else
	{
		SetPlayerHealth(id, 100.0);
		SendClientMessage(id, 0x00FF00AA, "You have been healed");
		SendClientMessage(playerid, 0x00FF00AA, "Player healed");
	}
	return 1;
}



Re: Help please - bluray - 08.02.2010

did u define dcmd at the top of the script?


Re: Help please - bartje01 - 08.02.2010

Yes


Re: Help please - Grim_ - 08.02.2010

pawn Код:
dcmd_heal(playerid, params[])
{
    new
        id;
    if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
    if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        SetPlayerHealth(id, 100.0);
        SendClientMessage(id, 0x00FF00AA, "You have been healed");
        SendClientMessage(playerid, 0x00FF00AA, "Player healed");
    }
    return 1;
}



Re: Help please - bartje01 - 08.02.2010

Thanks