[Help]Little problem
#1

Hey all,i have working on my mod and I have make a command to admin is on duty and off duty but I have some errors here is errors and lines :
Quote:

C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(580) : warning 209: function "cmd_aon" should return a value
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(581) : error 010: invalid function or declaration
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(583) : error 010: invalid function or declaration
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(599) : error 010: invalid function or declaration
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(600) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Lines :
Quote:

}
else return SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,nemate mogucnost da koristite ovu komandu!");
}
return 1;
}

How ti fix that?
Reply
#2

Help me please I need this hurry.
Reply
#3

Post your includes, defines, and that whole cmd whichever one it is.
Reply
#4

Here we go :

Quote:

CMD:aon(playerid,params[])
{
new ime[MAX_PLAYER_NAME], ip[24];
if(PI[playerid][Admin] >1 || IPA(playerid))
if(AdminDuznost[playerid] == 1) return SCM(playerid, BIJELA, "(greska) Vec imate ukljucenu Admin duznost!");
AdminDuznost[playerid] = 1;
PostaviEnergiju(playerid, 5000);
PostaviZastitu(playerid, 100);
PostaviBoju(playerid, CRVENA);
DajOruzje(playerid, 9, 20000);
DajOruzje(playerid, 18, 20000);
DajOruzje(playerid, 24, 20000);
DajOruzje(playerid, 26, 20000);
DajOruzje(playerid, 28, 20000);
DajOruzje(playerid, 29, 20000);
DajOruzje(playerid, 30, 20000);
DajOruzje(playerid, 31, 20000);
DajOruzje(playerid, 38, 20000);
DajOruzje(playerid, 36, 20000);
SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Ukljucio si se na Admin Duznost.");
SCMA(BIJELA, ""COL_ZUTA"[INFO]"COL_CRVENA"Admin : "COL_BIJELA"%s "COL_CRVENA"| Duznost : "COL_BIJELA"Iskljucena");
GetPlayerIp(playerid, ip, 24);
format(CmdString, 80, "| Administrator | Igrac: %s | Duznost: Ukljucena | IP: %s", ime, ip);
UpisiLog(FAJL_DUZNOSTLOG, CmdString);
}
else return SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,nemate mogucnost da koristite ovu komandu!");
}
return 1;
}

Reply
#5

Anybody please!
Reply
#6

pawn Код:
CMD:aon(playerid,params[])
{
    new ime[MAX_PLAYER_NAME], ip[24];
    if(PI[playerid][Admin] >1 || IPA(playerid))
    {
        if(AdminDuznost[playerid] == 1) return SCM(playerid, BIJELA, "(greska) Vec imate ukljucenu Admin duznost!");
        AdminDuznost[playerid] = 1;
        PostaviEnergiju(playerid, 5000);
        PostaviZastitu(playerid, 100);
        PostaviBoju(playerid, CRVENA);
        DajOruzje(playerid, 9, 20000);
        DajOruzje(playerid, 18, 20000);
        DajOruzje(playerid, 24, 20000);
        DajOruzje(playerid, 26, 20000);
        DajOruzje(playerid, 28, 20000);
        DajOruzje(playerid, 29, 20000);
        DajOruzje(playerid, 30, 20000);
        DajOruzje(playerid, 31, 20000);
        DajOruzje(playerid, 38, 20000);
        DajOruzje(playerid, 36, 20000);
        SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Ukljucio si se na Admin Duznost.");
        SCMA(BIJELA, ""COL_ZUTA"[INFO]"COL_CRVENA"Admin : "COL_BIJELA"%s "COL_CRVENA"| Duznost : "COL_BIJELA"Iskljucena");
        GetPlayerIp(playerid, ip, 24);
        format(CmdString, 80, "| Administrator | Igrac: %s | Duznost: Ukljucena | IP: %s", ime, ip);
        UpisiLog(FAJL_DUZNOSTLOG, CmdString);
    }
    else SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,nemate mogucnost da koristite ovu komandu!");
    return 1;
}
Reply
#7

Thanks it working and now I have problem I have made a command /kupioruzje or on English /buygun:

Quote:

CMD:kupioruzje(playerid,params[])
{
if(PI[playerid][Nivo] >3
SPD(playerid, kupioruzje, DIALOG_STYLE_LIST, "Kupovina oruzja", "1. Minigun", "Kupi", "Odustani");
}
else SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,morate biti level 3 da biste mogli kupovati oruzje!"
return 1;
}

I have errors:
Quote:

C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(654) : error 001: expected token: ")", but found "-identifier-"
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(656) : error 010: invalid function or declaration
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(657) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply
#8

pawn Код:
else SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,morate biti level 3 da biste mogli kupovati oruzje!");
Reply
#9

Uhh I forgot
Quote:

);

but problem is still stay

Quote:

C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(654) : error 001: expected token: ")", but found "-identifier-"
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(656) : error 010: invalid function or declaration
C:\Documents and Settings\Danny\Desktop\LSDM2\gamemodes\Satellite.p wn(657) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

I have resolve problem.
Reply
#10

Quote:
Originally Posted by Danny1
Посмотреть сообщение
Thanks it working and now I have problem I have made a command /kupioruzje or on English /buygun:

I have errors:

pawn Код:
CMD:kupioruzje(playerid,params[])
{
    if(PI[playerid][Nivo] >3
    {
        SPD(playerid, kupioruzje, DIALOG_STYLE_LIST, "Kupovina oruzja", "1. Minigun", "Kupi", "Odustani");
    }
    else SCM(playerid, BIJELA, ""COL_ZUTA"[INFO]"COL_BIJELA"Zao nam je,morate biti level 3 da biste mogli kupovati oruzje!"
    return 1;
}
you forgot your braket

if(brrr)
{
your code
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)