Help please
#1

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

did u define dcmd at the top of the script?
Reply
#3

Yes
Reply
#4

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

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)