Some errors for a command
#1

Hello i made a /adcmds
command and it is not letting me compile
here is my code:
pawn Код:
CMD:adcmds(playerid,params[])
{
    if(pInfo[playerid][Adminlevel] >=1)
    {
      ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 1 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.","Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=2)
    {
      ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 2 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.","Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=3)
    {
      ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 3 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.","Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=4)
    {
      ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 4 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.\n/unban - To unban a player.","Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=5)
    {
      ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 5 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.\n/unban - To unban a player.\n/makeadmin - To add someone to admin list.","Ok","Cancel");
    }
    return 1;
}

here are the errors:
Код:
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1459) : error 075: input line too long (after substitutions)
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1460) : error 037: invalid string (possibly non-terminated string)
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1460) : error 017: undefined symbol "Can"
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : warning 217: loose indentation
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : error 017: undefined symbol "cel"
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : error 001: expected token: ";", but found ")"
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(1461) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#2

What lines are which? Could you please tell us which lines have the problem. cuz we dont know which line 1459 is for example
Reply
#3

I cant really do it but if you can help me cause i dont know the reason for the errors
Reply
#4

pawn Код:
CMD:adcmds(playerid,params[])
{
    new admstring[256];
    if(pInfo[playerid][Adminlevel] >=1)
    {
        format(admstring,sizeof(admstring),"{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.");
        ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 1 Commands",admstring,"Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=2)
    {
        format(admstring,sizeof(admstring),"{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.");
        ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 2 Commands","{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.","Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=3)
    {
        format(admstring,sizeof(admstring),"{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.");
        strcat(admstring,"\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.");
        ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 3 Commands",admstring,"Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=4)
    {
        format(admstring,sizeof(admstring),"{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.");
        strcat(admstring,"\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.\n/unban - To unban a player.");
        ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 4 Commands",admstring,"Ok","Cancel");
    }
    if(pInfo[playerid][Adminlevel] >=5)
    {
        format(admstring,sizeof(admstring),"{FFFFFF}/warn - Usage /warn [id] [reason].\n/clearchat - To clear the chat.\n/adan - To announce something to the server.\n/kick - To kick a player.\n/goto - To teleport to a player.");
        strcat(admstring,"\n/ban - to ban a player.\n/setmoney - To set someone's money.\n/setarmor - To set player armor.\n/sethp - To set player's health.\n/fly - To get jetpack.\n/addrp - To add someone to rp list.\n/unban - To unban a player.\n/makeadmin - To add someone to admin list.");
        ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{FF0000}Admin Level 5 Commands",admstring,"Ok","Cancel");
    }
    return 1;
}
Try this out
Reply
#5

Thanks for the help it worked +1Reped

off topic : Whats up twin we have the same nickname but in a different format
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)