Error compile please enter
#1

i got this error:

Код:
 C:\Users\Administrator\Desktop\Legends Gaming RP\pawno\system.pwn(107) : error 017: undefined symbol "PlayerInfo"
C:\Users\Administrator\Desktop\Legends Gaming RP\pawno\system.pwn(107) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Legends Gaming RP\pawno\system.pwn(107) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\Legends Gaming RP\pawno\system.pwn(107) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Legends Gaming RP\pawno\system.pwn(107) : fatal error 107: too many error messages on one line

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


4 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/acmds", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "  Commands coming soon ....");
                return 1;
            }
        }
        return 1;
    }
    return 0;
}
Reply
#2

You need to have the variable in your script to begin with, I assume you're trying to use an enum system? Like so.

pawn Код:
enum pInfo
{
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Use that at the top of your script to define the variable you're trying to use in that if statement.
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
You need to have the variable in your script to begin with, I assume you're trying to use an enum system? Like so.

pawn Код:
enum pInfo
{
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Use that at the top of your script to define the variable you're trying to use in that if statement.
dont works..
Reply
#4

Quote:
Originally Posted by Brian_Furious
Посмотреть сообщение
dont works
What doesn't work? What is the problem? I can't help if you don't explain what's wrong
Reply
#5

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
What doesn't work? What is the problem? I can't help if you don't explain what's wrong
this is my full script

http://pawn.pastebin.com/rkD2SMGM

Whats wrong?
Reply
#6

pawn Код:
enum pInfo
{
    pKey[128],
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
You put that under

pawn Код:
#if defined FILTERSCRIPT
The script is not defined as a filterscript. If you want it as a filterscript, add

pawn Код:
#define FILTERSCRIPT
To the top before the #if define FILTERSCRIPT

Alternatively, remove the entire checking if it's a filterscript completely.
Reply
#7

it does not work because you are not setting yourself to admin. or saving admin in your account system (you dont have one i assume).
Reply
#8

- Eh, nevermind. The indentation of the pastebin link, confused me.
Reply
#9

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
pawn Код:
enum pInfo
{
    pKey[128],
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
You put that under

pawn Код:
#if defined FILTERSCRIPT
The script is not defined as a filterscript. If you want it as a filterscript, add

pawn Код:
#define FILTERSCRIPT
To the top before the #if define FILTERSCRIPT

Alternatively, remove the entire checking if it's a filterscript completely.
damn, it works fine now, thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)