17.04.2018, 12:31
Hello help me with my command when commands exsicutes the output outcomes buggy
Triger on command
MYSQL TABLE
I checked mysqllog.txt and the fetching looks good
mysqllog.txt https://pastebin.com/SDiC6STn
tried %s and %d format just for check if the value isnt set to int
and for testing i left in else just full array but nothing works
Triger on command
Код:
CMD:sandelys(playerid) { new query[500]; format(query, sizeof(query), "SELECT * FROM `Logai1` ORDER BY `ID` DESC limit 400"); mysql_query(query); mysql_store_result(); new i, strf[200], str[500], eilute[500]; new vardas[500], ivykis[500], idejo[500], date[500]; for(i = 0; i < 400; i++) { mysql_fetch_row(eilute); mysql_fetch_field_row ( query, "Vardas" ) ; vardas[i] = strval ( query ) ; <-- Name mysql_fetch_field_row ( query, "Ivykis" ) ; ivykis[i] = strval ( query ) ; <-- Custom log mysql_fetch_field_row ( query, "Idejo" ) ; idejo[i] = strval ( query ) ; <-- IN/OUT mysql_fetch_field_row ( query, "Date" ) ; date[i] = strval ( query ) ; <-- DATE if(idejo[i] == 1) <-- IF the log contain true in "idejo" { format(str, 300, "{00ff00}%s, %s %s\n",vardas[i],ivykis[i],date[i]); strcat(strf, str); } else format(str, 300, "{ff0000}%s, %s %s\n",vardas,ivykis,date); strcat(strf, str); } mysql_free_result(); ShowPlayerDialog(playerid, 2525, DIALOG_STYLE_LIST, "Sandelio Logai", strf, "Aiљku", ""); }
I checked mysqllog.txt and the fetching looks good
mysqllog.txt https://pastebin.com/SDiC6STn
tried %s and %d format just for check if the value isnt set to int
and for testing i left in else just full array but nothing works