SA-MP Forums Archive
PLEASE I NEED 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: PLEASE I NEED HELP (/showthread.php?tid=314499)



PLEASE I NEED HELP - Youice - 30.01.2012

Код:
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(575) : error 017: undefined symbol "gPlayerInfo"
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(575) : warning 215: expression has no effect
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(575) : error 001: expected token: ";", but found "]"
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(575) : error 029: invalid expression, assumed zero
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(575) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Please I need help with it , Im just a new scripter


Re: PLEASE I NEED HELP - trapped1 - 30.01.2012

Show code (that line or some peace of it)..


Re: PLEASE I NEED HELP - Youice - 30.01.2012

Quote:
Originally Posted by trapped1
Посмотреть сообщение
Show code (that line or some peace of it)..
Okay here is the code::-

Код:
dcmd_setzombie(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[setzombie]) //Error in here
    {
        new string[128];
        format(string, sizeof(string), "You must be a level %d administrator to use that command!", gCommands[setazombie]);
        SendClientMessage(playerid, COLOR_RED, string);
    }
    else
    {
        new tmp[256], tmp2[256], index, id;
        tmp = strtok(params, index);
        tmp2 = strtok(params, index);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_ORANGE, "/setzombie [id]");
        }
        else if(!strlen(tmp2))
        {
            SendClientMessage(playerid, COLOR_ORANGE, "/setzombie [id]");
        }
        else
        {
            id = strval(tmp);
            if(!IsPlayerConnected(id))
            {
                SendClientMessage(playerid, COLOR_ORANGE, " That player is not connected.");
            }
            else if(id == playerid)
            {
                SendClientMessage(playerid, COLOR_ORANGE, "you can't set your self as a zombie.");
            }
            else if(gPlayerInfo[id][PLAYER_LEVEL] > gPlayerInfo[playerid][PLAYER_LEVEL])
            {
                SendClientMessage(playerid, COLOR_ORANGE, "you can't set a higher admin level than you as a zombie.");
            }
            else
            {
                new string[256], name[MAX_PLAYER_NAME];
                GetPlayerName(id, name, sizeof(name));
                if(id >= 0 && id <= 9)
                {
                    format(string, sizeof(string), "you have been set as a zombie by an admin.", params[2]);
                    SendClientMessage(id, COLOR_ORANGE, string);
                    setazombie(id);
                }
            }
        }
    }
    return 1;
}



Re: PLEASE I NEED HELP - Konstantinos - 30.01.2012

pawn Код:
// At The top Under The Includes && Defines

enum pInfo
{
    PLAYER_LEVEL,
    // Rest ( Like Money etc..
    // At The last no ","
}
new
     gPlayerInfo[ MAX_PLAYERS ][ pInfo ];



Re: PLEASE I NEED HELP - Youice - 30.01.2012

LOL , Thanks for your help but I had 4 errors

Код:
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(582) : error 017: undefined symbol "gCommands"
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(582) : error 017: undefined symbol "setzombie"
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(582) : error 029: invalid expression, assumed zero
C:\Users\BCC\Desktop\ZOMBIE MOD ROLEPLAY\filterscripts\ZM2.pwn(582) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: PLEASE I NEED HELP - Konstantinos - 30.01.2012

This will help you.
Click
You have add things but you don't even define them.


Re: PLEASE I NEED HELP - Youice - 30.01.2012

Thanks , I will read and learn and sorry for my foolish