Problem sa erorrima


Započeo Gladiator99012, Jun 05, 2020, 00:12:26 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

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

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
/

Slika/video ingame problema(obavezno ako je ingame problem): /
Poslednja Izmena: Jun 05, 2020, 00:17:44 PRE PODNE od Milos0499

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

11246 format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);
Poslednja Izmena: Jun 05, 2020, 12:09:14 POSLE PODNE od Gladiator99012

Pa čoveče kako da znamo gde se nalazi ta linija..
Paradox ON DUTY

format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);


Zameni sa

format(string,sizeof(string), ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);


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
format(string,sizeof string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);
Poslednja Izmena: Jun 05, 2020, 12:32:22 POSLE PODNE od Crownshot
My tutorials: PawnPlus MySQL, y_colours

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

11246 format(string,sizeof,string, ""COL_GX"[APM] "BELA"Poslali ste APM igracu %s (ID:%d): %s", GetName(id), id, poruka);


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