Problem(error/warning): Problem se javlja kod listitema dialoga, tacnije prilikom ucitavanja imena iz dialoga, ucita mi samo ID 1, a posle toga ne zeli nista da ucita, kaze da nema toga u bazi, a lepo je kreirano.
Dio skripte: [ pawn ]Dialog:PLAYERGPSS(playerid, response, listitem, inputtext[])
{
if(response)
{
if(IsValidDynamicMapIcon(GPSMarker[playerid]))
{
DestroyDynamicMapIcon(GPSMarker[playerid]);
}
new Query[216],
string[200];
mysql_format(conn, Query, sizeof(Query), "SELECT * FROM `gpsdb` WHERE `LocationName` = '%e'", eGps[listitem][e_GPS_NAME]);
new Cache:result = mysql_query(conn, Query, true);
if(!cache_num_rows())
{
cache_delete(result);
SendClientMessage(playerid, COLOR_TOMATO,"{B2D0ED}[ERROR_usage]: "COL_WHITE"The location you entered does not exist.");
return true;
}
for(new i,j = cache_num_rows(); i< j; i++)
{
cache_get_value_name(i, "LocationName", eGps[e_GPS_NAME], 36);
cache_get_value_name_float(i, "PositionX", eGps[e_GPS_POS][0]);
cache_get_value_name_float(i, "PositionY", eGps[e_GPS_POS][1]);
cache_get_value_name_float(i, "PositionZ", eGps[e_GPS_POS][2]);
cache_get_value_name_int(i, "InteriorID", eGps[e_GPS_INT]);
GPSMarker[playerid] = CreateDynamicMapIcon(eGps[e_GPS_POS][0], eGps[e_GPS_POS][1], eGps[e_GPS_POS][2], 0, COLOR_TOMATO, -1, -1, playerid, 6000.0, MAPICON_GLOBAL);
if(IsPlayerAdmin(playerid))
{
format(string, sizeof(string), "Coordinate seted to: "COL_WHITE"'%f'"COL_GREEN"-"COL_WHITE"'%f'"COL_GREEN"-"COL_WHITE"'%f'"COL_GREEN".", eGps[e_GPS_POS][0], eGps[e_GPS_POS][1], eGps[e_GPS_POS][2]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "Coordinate seted to gps location "COL_TOMATO"%s"COL_GREEN".", eGps[e_GPS_NAME]);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
return true;
}[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ][17:17:36] [plugins/mysql] mysql_escape_string: destination array too small (needs at least '5' cells; has only '1')
[17:17:49] [plugins/mysql] mysql_escape_string: destination array too small (needs at least '6' cells; has only '1')[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem):