SA-MP Forums Archive
Command error - 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: Command error (/showthread.php?tid=356251)



Command error - jeremy8810 - 02.07.2012

Guys im making an command that is for admins lvl 1 and higher but getting this errors:

Quote:

C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(286) : error 017: undefined symbol "APlayerData"
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(286) : warning 215: expression has no effect
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(286) : error 001: expected token: ";", but found "]"
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(286) : error 029: invalid expression, assumed zero
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(286) : fatal error 107: too many error messages

Errors come from this line:
PHP код:
if(APlayerData[playerid][PlayerLevel] >= 1
Script:
PHP код:
CMD:carneon(playeridparams[])
{
    if(
APlayerData[playerid][PlayerLevel] >= 1)
    {
        
ShowMenuForPlayer(neonmenu,playerid);
         else
        {
            
SendClientMessage(playerid0xFFFFFFAA"ERROR: You cannot use this command!");
        }
    }
    
    return 
1;

can someone tell what I did wrong and how to fix it?

Thanks


Re: Command error - Riddy - 02.07.2012

Which line is the error on?


Re: Command error - jeremy8810 - 02.07.2012

Errors come from this line:
PHP код:
if(APlayerData[playerid][PlayerLevel] >= 1
^^ as I told in my message above^^
The script is longer, but the errors come from this command, so I only copied the command


Re: Command error - tyler12 - 02.07.2012

Is the admin system in that script?


Re: Command error - FireCat - 02.07.2012

pawn Код:
CMD:carneon(playerid, params[])
{
    if(APlayerData[playerid][PlayerLevel] == 0) return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: You cannot use this command!");
    ShowMenuForPlayer(neonmenu,playerid);
    return 1;
}



Re: Command error - jeremy8810 - 02.07.2012

Quote:
Originally Posted by FireCat
Посмотреть сообщение
pawn Код:
CMD:carneon(playerid, params[])
{
    if(APlayerData[playerid][PlayerLevel] == 0) return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: You cannot use this command!");
    ShowMenuForPlayer(neonmenu,playerid);
    return 1;
}
Still getting errors on this line:
PHP код:
    if(APlayerData[playerid][PlayerLevel] == 0) return SendClientMessage(playerid0xFFFFFFAA"ERROR: You cannot use this command!"); 
Errors:
Quote:

C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(287) : error 017: undefined symbol "APlayerData"
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(287) : warning 215: expression has no effect
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(287) : error 001: expected token: ";", but found "]"
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(287) : error 029: invalid expression, assumed zero
C:\Users\Games\Desktop\World European Trucking Server\filterscripts\NeonColorsV2.1.2Beta.pwn(287) : fatal error 107: too many error messages on one line

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


4 Errors.
Quote:
Originally Posted by tyler12
Посмотреть сообщение
Is the admin system in that script?
@Tyler:
No admin system is not in this script.