Problem(error/warning): Hteo sam da napravim komandu APM(Admin PM) kad ti Admin posalje PM da ne pise ko ti je poslao nego da pise samo "Administrator" i izbacuje mi ove errore:
error 020: invalid symbol name ""
warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Dio skripte: [pawn] YCMD:apm(playerid, params[],help)
{
#pragma unused help
if(UlogovanProvera[playerid] == 0) return Error(playerid, "Morate biti ulogovani, kako bi koristili komande!");
new id, giveplayerid, poruka[128];
if(PI[playerid][pAdmin] >= 1)
{
if(PI[playerid][pZatvor] > 0) return Error(playerid, "Ne mozes to, zatvren si");
if(sscanf(params, "us[128]", id, poruka)) return Cmd(playerid, "/apm (playerid) (text)");
new string[156];
if(!IsPlayerConnected(id)) return Error(playerid, " Pogresan ID");
format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);
SCM(playerid, -1,string);
format(string,sizeof,string ,""COL_GX"[APM] "BELA"Administrator: %s", poruka);
SCM(id, -1,string);
format(string,sizeof,string ,""COL_GX"(A) Information "BELA"%s je poslao APM igracu %s (ID:%d): %s", GetName(playerid), GetName(id), id, poruka);
SendAdminMessage(-1,string);
}
else return Error(playerid, "Niste ovlasceni, za ovaj sektor komandi!");
return true;
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): /
Pošalji liniju na koju ti izbacuju erorri
Citat: t1m1c poslato Jun 05, 2020, 11:52:15 PRE PODNE
Pošalji liniju na koju ti izbacuju erorri
(11246) : error 020: invalid symbol name ""
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : error 001: expected token: ";", but found ")"
(11246) : error 029: invalid expression, assumed zero
(11246) : fatal error 107: too many error messages on one line
[pawn] 11246 format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka); [/pawn]
Pa čoveče kako da znamo gde se nalazi ta linija..
[pawn]format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);[/pawn]
Zameni sa
[pawn]format(string,sizeof(string), ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);[/pawn]
Isto uradiš i sa svim ostalim formatima.
Ne pišeš string,sizeof,string.
A ne moraš ni zagrade da stavljaš, sve je stvar ukusa, možeš dakle i
[pawn]format(string,sizeof string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);[/pawn]
Citat: Gladiator99012 poslato Jun 05, 2020, 12:04:13 POSLE PODNE
(11246) : error 020: invalid symbol name ""
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : warning 215: expression has no effect
(11246) : error 001: expected token: ";", but found ")"
(11246) : error 029: invalid expression, assumed zero
(11246) : fatal error 107: too many error messages on one line
[pawn] 11246 format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka); [/pawn]
Umesto
format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);
Stavi
format(string,sizeof string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);
Ne treba ti zarez izmedju "sizeof" i "string"
EDIT: Nisam video da je neko vec odgovorio, pardoniram :D