Error compile please enter - 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: Error compile please enter (
/showthread.php?tid=166251)
Error compile please enter -
Brian_Furious - 07.08.2010
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;
}
Re: Error compile please enter -
JaTochNietDan - 07.08.2010
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.
Re: Error compile please enter -
Brian_Furious - 08.08.2010
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..
Re: Error compile please enter -
JaTochNietDan - 08.08.2010
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
Re: Error compile please enter -
Brian_Furious - 08.08.2010
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?
Re: Error compile please enter -
JaTochNietDan - 08.08.2010
pawn Код:
enum pInfo
{
pKey[128],
pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
You put that under
The script is not defined as a filterscript. If you want it as a filterscript, add
To the top before the #if define FILTERSCRIPT
Alternatively, remove the entire checking if it's a filterscript completely.
Re: Error compile please enter -
Kar - 08.08.2010
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).
Re: Error compile please enter -
Carlton - 08.08.2010
- Eh, nevermind. The indentation of the pastebin link, confused me.
Re: Error compile please enter -
Brian_Furious - 08.08.2010
Quote:
Originally Posted by JaTochNietDan
pawn Код:
enum pInfo { pKey[128], pAdmin, }; new PlayerInfo[MAX_PLAYERS][pInfo];
You put that under
The script is not defined as a filterscript. If you want it as a filterscript, add
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