variable u vezi komande lastseen

Započeo Janko, Septembar 12, 2018, 18:48:40 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):
error 033: array must be indexed (variable "igrac")
error 033: array must be indexed (variable "igrac")

Dio skripte:
YCMD:lastseen(playerid, params[], help)
{
	new igrac[25], filestring[79],string[256];
    if(sscanf(params, "s[25]", igrac)) return SCM(playerid, -1, "Komanda | "ZUTA"/lastseen [Ime_Prezime]");
	format(filestring, sizeof(filestring), "Korisnici/%s.ini", igrac);
    if(!fexist(filestring)) return SCM(playerid, -1, "[] "ZUTA"To Ime_Prezime nije pronadjeno u bazi podataka!");
	new INI:File = INI_Open(filestring);
	INI_WriteString(File,"LastSeen",PlayerInfo[igrac][pLastSeen]);
	new d,m,yy,h,mi,s;
	getdate(yy,m,d);
	gettime(h,mi,s);
	format(string, sizeof(string), ""CRVENA"%d/%d/%d at %d:%d:%d",d,m,yy,h,mi,s);
	SCM(playerid,PlayerInfo[igrac][pLastSeen],string);
	return 1;
}

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

Slika/video ingame problema(obavezno ako je ingame problem)://

Ovde ce te ispisivati trenutno vrijeme servera.

YCMD:lastseend(playerid, params[], help) {
if (isnull(params)) return SCM(playerid, -1, "Komanda | "ZUTA"/lastseen [Ime_Prezime]");
new buff[48];
format(buff, sizeof buff, "Korisnici/%s.ini", params);
if (!fexist(buff)) return SCM(playerid, -1, "[] "ZUTA"To Ime_Prezime nije pronadjeno u bazi podataka!");
new INI:File = INI_Open(buff), lastseen[32];
INI_WriteString(File,"LastSeen",lastseenstr);
INI_Close(File);
format(buff, sizeof(buff), ""CRVENA"%s",lastseenstr);
SCM(playerid,-1, buff);
return 1;
}

 error 035: argument type mismatch (argument 3)
warning 203: symbol is never used: "LastSeen"
Pokusao sam sve ali ne ide



>>>OVA  new INI:File = INI_Open(buff), LastSeen;

>>>OVA INI_WriteString(File,"LastSeen",lastseenstr);

kazi sta ti treba jos

Dao sam ti komandu sta mijenjas bzvz, LastSeen si stavio kao integer a hoces da ti cuva string
YCMD:lastseend(playerid, params[], help) {
if (isnull(params)) return SCM(playerid, -1, "Komanda | "ZUTA"/lastseen [Ime_Prezime]");
new buff[48];
format(buff, sizeof buff, "Korisnici/%s.ini", params);
if (!fexist(buff)) return SCM(playerid, -1, "[] "ZUTA"To Ime_Prezime nije pronadjeno u bazi podataka!");
new INI:File = INI_Open(buff), lastseen[32];
INI_WriteString(File,"LastSeen",lastseenstr);
INI_Close(File);
format(buff, sizeof(buff), ""CRVENA"%s",lastseenstr);
SCM(playerid,-1, buff);
return 1;
}

pa da ali ima errore,ja sam pokusao da resim zato sam to izmenjao
(28995) : error 017: undefined symbol "lastseenstr" == INI_WriteString(File,"LastSeen",lastseenstr);

(28997) : error 017: undefined symbol "lastseenstr" == format(buff, sizeof(buff), ""CRVENA"%s",lastseenstr);

(28994) : warning 204: symbol is assigned a value that is never used: "lastseen" == new INI:File = INI_Open(buff), lastseen[32];


E sada dolazimo na sledeci korak,aahah,pa ovako sada mi ne ucita text ja sam dodao ovo poslednji put vidjen da vidim da li prikazuje i prikaze samo ovaj text a datum i vreme nece

format(buff, sizeof(buff), "poslednji put vidjen:%s",lastseenstr);
SCM(playerid,-1, buff);
samo prazno ako nema ovo poslednji put vidjen