CMD:jail errors
#1

Hello, I found this cmd to use but it has errors i cant fix this can you help me,, & & i need to put reason for jail.
ERRORS:
pawn Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(877) : error 017: undefined symbol "DenyMessage"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(882) : error 017: undefined symbol "money"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 029: invalid expression, assumed zero
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

6 Errors.
Command:
pawn Код:
CMD:jail(playerid, params[])
{
    new giveplayerid, time;
    if(sscanf(params, "ud", giveplayerid, time))SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [playerid] [time]");
    if(PlayerInfo[playerid][pAdmin] < 2)return DenyMessage(playerid, 2);
    if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
    if(PlayerInfo[playerid][pAdmin] < PlayerInfo[giveplayerid][pAdmin])return SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't jail a higher level Admin !");
    else
    {
        PlayerInfo[giveplayerid][pPrisonTime] = money; // <<<=== do i need to put here pCash?
        PlayerInfo[giveplayerid][pPrison] = 1;
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        ResetPlayerWeapons(giveplayerid);
        GameTextForPlayer(giveplayerid, "~r~Busted", 3000, 3);
        SetPlayerInterior(giveplayerid, 3);
        SetPlayerPos(giveplayerid, 198.5319,162.3093,1003.0300);
        format(string, sizeof(string), "\"%s\" has been jailed by Admin \"%s\" for %d seconds.", giveplayer, sendername, money);
        SendClientMessageToAll(COLOR_YELLOW, string);
        SetTimerEx("UnJail",PlayerInfo[giveplayerid][pPrisonTime]*1000,0,"d",giveplayerid);
    }
    return true;
}
Reply
#2

Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(877) : error 017: undefined symbol "DenyMessage":
DenyMessage function does not exist. You either have to create or just use SendClientMessage since I guess that's what the function does.

Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(882) : error 017: undefined symbol "money"
Change word money to time

Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
Change to giveplayerid

Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
Change to giveplayerid

Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 029: invalid expression, assumed zero
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : fatal error 107: too many error messages on one line
These to shouldn't appear after you've fixed other errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)