Pomoc oko /g Chata

Započeo Todor Script, Septembar 19, 2018, 22:52:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Poceo sam raditi UP mod i primetio sam da nece /g chat da radi za admine vec samo za helpere sto sam odlucio da popravim pri popravljanju javlja mi se eror evo sta pise C:\Users\Todor\Desktop\Underpoint RolePlay 0.3x\gamemodes\ag-rp.pwn(8305) : error 001: expected token: ")", but found "if"
C:\Users\Todor\Desktop\Underpoint RolePlay 0.3x\gamemodes\ag-rp.pwn(8321) : warning 209: function "@_yCg" should return a value
C:\Users\Todor\Desktop\Underpoint RolePlay 0.3x\gamemodes\ag-rp.pwn(8322) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

Dio skripte: [ pawn ]Evo vam cela komanda g chata da vidite i ako mozete da mi pomognete dao sam vam liniju i sve
YCMD:g(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1
   if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"AG:RP | "SPLAVA"Ne mozete koristiti ovu komandu jer ste zatvoreni!");
   new text[256], string[128], sendername[MAX_PLAYER_NAME];
   GetPlayerName(playerid, sendername, sizeof(sendername));
   if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""ORANGE"AG:RP Pomoc | "SIVA" /g [tekst]");
   new arank[124];
   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(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
   else if(PlayerInfo[playerid][pGM] == 1) { arank = "Helper Level 1"; }
   else if(PlayerInfo[playerid][pGM] == 2) { arank = "Helper Level 2"; }
   else if(PlayerInfo[playerid][pGM] == 3) { arank = "Helper Level 3"; }
   format(string, sizeof(string), ""ZELENA"G | "BELA"%s "ZELENA"%s"BELA": %s",arank,sendername,text);
   AdminHelper(-1,string);
   }
   return 1;
}
[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): /

Koja ti je linija 8305
koja ova 8321
a koja ova 8322

Probaj ovako


YCMD:g(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
    {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"AG:RP | "SPLAVA"Ne mozete koristiti ovu komandu jer ste zatvoreni!");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""ORANGE"AG:RP Pomoc | "SIVA" /g [tekst]");
      new arank[124];
      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(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
      else if(PlayerInfo[playerid][pGM] == 1) { arank = "Helper Level 1"; }
      else if(PlayerInfo[playerid][pGM] == 2) { arank = "Helper Level 2"; }
      else if(PlayerInfo[playerid][pGM] == 3) { arank = "Helper Level 3"; }
      format(string, sizeof(string), ""ZELENA"G | "BELA"%s "ZELENA"%s"BELA": %s",arank,sendername,text);
      AdminHelper(-1,string);
   }
      return 1;
}

imas i nemoguce stringove  ???

YCMD:g(playerid, params[],help)
{
#pragma unused help
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
    {
    if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"AG:RP | "SPLAVA"Ne mozete koristiti ovu komandu jer ste zatvoreni!");
    new text[256], string[340],arank[32], sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(sscanf(params, "s[256]", text)) return SCM(playerid, -1, ""ORANGE"AG:RP Pomoc | "SIVA" /g [tekst]");
    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(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
    else if(PlayerInfo[playerid][pGM] == 1) { arank = "Helper Level 1"; }
    else if(PlayerInfo[playerid][pGM] == 2) { arank = "Helper Level 2"; }
    else if(PlayerInfo[playerid][pGM] == 3) { arank = "Helper Level 3"; }
    format(string, sizeof(string), ""ZELENA"G | "BELA"%s "ZELENA"%s"BELA": %s",arank,sendername,text);
    AdminHelper(-1,string);
    }
    return 1;
}

Citat: PazzOnee poslato Septembar 20, 2018, 00:48:34 PRE PODNE
Probaj ovako


YCMD:g(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
    {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"AG:RP | "SPLAVA"Ne mozete koristiti ovu komandu jer ste zatvoreni!");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""ORANGE"AG:RP Pomoc | "SIVA" /g [tekst]");
      new arank[124];
      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(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
      else if(PlayerInfo[playerid][pGM] == 1) { arank = "Helper Level 1"; }
      else if(PlayerInfo[playerid][pGM] == 2) { arank = "Helper Level 2"; }
      else if(PlayerInfo[playerid][pGM] == 3) { arank = "Helper Level 3"; }
      format(string, sizeof(string), ""ZELENA"G | "BELA"%s "ZELENA"%s"BELA": %s",arank,sendername,text);
      AdminHelper(-1,string);
   }
      return 1;
}


Nece,sad mi iskocio warinng za ovaj return 1;


C:\Users\Todor\Desktop\Underpoint RolePlay 0.3x\gamemodes\ag-rp.pwn(8323) : warning 217: loose indentation
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

Citat: Todor Script poslato Septembar 20, 2018, 21:33:27 POSLE PODNE

Nece,sad mi iskocio warinng za ovaj return 1;


C:\Users\Todor\Desktop\Underpoint RolePlay 0.3x\gamemodes\ag-rp.pwn(8323) : warning 217: loose indentation
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Taj warning ti je zato sto return nije tabovan... To ti ne pravi problem a mozes i sam da ga tabujes

Citat: M!chaeL poslato Septembar 22, 2018, 13:40:50 POSLE PODNE
Taj warning ti je zato sto return nije tabovan... To ti ne pravi problem a mozes i sam da ga tabujes
Kako da ga tabujem


Upisi ovo na vrh skripte mozes i odmah ispod includova

#pragma tabsize 0

I onda compajlaj

Citat: PazzOnee poslato Septembar 22, 2018, 15:58:55 POSLE PODNE
Upisi ovo na vrh skripte mozes i odmah ispod includova

#pragma tabsize 0

I onda compajlaj

Ne! Nipošto to nemoj raditi!

To bi mu bilo privremeno resenje...
Evo ti probaj ovako:

YCMD:g(playerid, params[],help)
{
   #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"AG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
    {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"AG:RP | "SPLAVA"Ne mozete koristiti ovu komandu jer ste zatvoreni!");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""ORANGE"AG:RP Pomoc | "SIVA" /g [tekst]");
      new arank[124];
      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(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
      else if(PlayerInfo[playerid][pGM] == 1) { arank = "Helper Level 1"; }
      else if(PlayerInfo[playerid][pGM] == 2) { arank = "Helper Level 2"; }
      else if(PlayerInfo[playerid][pGM] == 3) { arank = "Helper Level 3"; }
      format(string, sizeof(string), ""ZELENA"G | "BELA"%s "ZELENA"%s"BELA": %s",arank,sendername,text);
      AdminHelper(-1,string);
   }
   return 1;
}


Citat: Todor Script poslato Septembar 22, 2018, 20:22:30 POSLE PODNE
Sta ce se desiti?????

Bože.Neće se ništa desiti,ali zašto ga učiti krivo? Početniku govoriti da "sakriva" warninge,umjesto ga naučiti da ih riješi.Ako to ne zna riješiti onda nema šta dalje raditi,kako će druge errore/warninge riješiti ako ne može poredati linije?


Citat: Paul Castellano poslato Septembar 22, 2018, 20:38:05 POSLE PODNE
Bože.Neće se ništa desiti,ali zašto ga učiti krivo? Početniku govoriti da "sakriva" warninge,umjesto ga naučiti da ih riješi.Ako to ne zna riješiti onda nema šta dalje raditi,kako će druge errore/warninge riješiti ako ne može poredati linije?
Hvala ti puno,prvi neko ko mi je dao podrsku da prvi put uradim svoj mod