SA-MP Forums Archive
[Help]Little problem - 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: [Help]Little problem (/showthread.php?tid=336274)



[Help]Little problem - Danny1 - 21.04.2012

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?


Re: [Help]Little problem - Danny1 - 21.04.2012

Help me please I need this hurry.


Re: [Help]Little problem - PjFord - 21.04.2012

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


Re: [Help]Little problem - Danny1 - 21.04.2012

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;
}




Re: [Help]Little problem - Danny1 - 22.04.2012

Anybody please!


Re: [Help]Little problem - [MG]Dimi - 22.04.2012

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;
}



Re: [Help]Little problem - Danny1 - 22.04.2012

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.




Re: [Help]Little problem - Hoss - 22.04.2012

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



Re: [Help]Little problem - Danny1 - 22.04.2012

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.


Re: [Help]Little problem - doreto - 22.04.2012

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
}