error

Započeo Dimi123321123, Maj 20, 2023, 15:41:25 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

 moze help pls
C:\Users\Asus\Desktop\Mod lol\Server10012022SAMP (3)\Server\gamemodes\pcrp.pwn(2887) : error 017: undefined symbol "AdminRankName"
C:\Users\Asus\Desktop\Mod lol\Server10012022SAMP (3)\Server\gamemodes\pcrp.pwn(2888) : error 035: argument type mismatch (argument 2)
C:\Users\Asus\Desktop\Mod lol\Server10012022SAMP (3)\Server\gamemodes\pcrp.pwn(2908) : warning 217: loose indentation
C:\Users\Asus\Desktop\Mod lol\Server10012022SAMP (3)\Server\gamemodes\pcrp.pwn(2933) : warning 217: loose indentation


CMD:a(playerid, params[])
{
   if(PlayerInfo[playerid][pAdmin] == 0)
   return SendClientMessage(playerid, -1, "Nemas Permisije!");
   {
      new string[128], text[80];
      if(sscanf(params, "s[80]", text))
      return SendClientMessage(playerid, -1, "[M:RP] /a [text]");
      format(string, sizeof(string), "%s | %s | : %s", AdminRankName(playerid), ReturnPlayerName(playerid), text);
      SendClientMessage(COLOR_RED, string);
   }

   return 1;
}


[pawn]
CMD:a(playerid, params[])
{
   if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "Nemas Permisije!");
   {
        new string[128], text[80], rank[40];
        if(sscanf(params, "s[80]", text)) return SendClientMessage(playerid, -1, "[M:RP] /a [text]");
        if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
       else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
       else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
       else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
       format(string, sizeof(string), "%s | %s | : %s", arank, ReturnPlayerName(playerid), text);
       SendClientMessage(COLOR_RED, string);
   }
   return 1;
}
[/pawn]

Mozda ovako ti treba nesto da definiras sebi. Pogledaj primjerak ispod.

[pawn]YCMD:a(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AS:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, ""CRVENA"[AS:RP] "SIVA"Samo Admini!");
   new text[256], string[512], sendername[MAX_PLAYER_NAME];
   GetPlayerName(playerid, sendername, sizeof(sendername));
   if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""CRVENA"[AS:RP ]Pomoc | "BELA"/a [tekst]");
   new arank[64];
   if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
   else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
   else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
   else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
   else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Head Admin"; }
    else if(PlayerInfo[playerid][pSkripter] == 1) { arank = "Skripter"; }
    else if(PlayerInfo[playerid][pSkripter] == 4) { arank = "Mapper"; }
    else if(PlayerInfo[playerid][pVlasnik] == 1) { arank = "Vlasnik"; }
   else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Vlasnik"; }
   else { arank = "Admin"; }
   format(string, sizeof(string), ""CRVENA"ADMIN | "BELA"%s "CRVENA"%s"BELA": %s",arank,sendername,text);
   SendAdminMessage(-1,string);
   return 1;
}[/pawn]

Nauci prvo sta znaci warning, veoma lako ces ga rijesiti.

[pawn]CMD:a(playerid, params[])
{
       if(PlayerInfo[playerid][pAdmin] != 0)
       {
             if(isnull(params)) return SendClientMessage(playerid, -1, "{FF0000}USAGE : {FFFFFF}/a [Tekst]");
             new string[240];
             format(string, sizeof(string), "[Admin Chat] >> %s %s << : %s",GetAdminRank(playerid), GetName(playerid), params);
             SendAdminMessage(-1, string);
       }
       else return SendClientMessage(playerid, -1, "{FF0000}PERMISIONS : {FFFFFF}Nemate ovlastenja za ovu komandu");
       return 1;
}[/pawn]
[pawn]stock GetAdminRank(playerid)
{
         new arank[35];
         if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
         else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
         else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
         else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
         else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Admin Level 5 (Head Admin)"; }
         else if(!strcmp(GetName(playerid), "Fergosonn", true)) { arank = "Vlasnik"; }
         else if(!strcmp(GetName(playerid), "skorpija.", true)) { arank = "Developer"; }
         else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }

         return arank;
}[/pawn]