Not load bizz - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Not load bizz (
/showthread.php?tid=590103)
Not load bizz -
Jimmi - 25.09.2015
Not load bizz
Код:
[23:21:32] [DEBUG] mysql_format - connection: 0, len: 256, format: "SELECT * FROM `bizz` ORDER BY `bizz`.`ID` ASC"
[23:21:32] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:21:32] [DEBUG] mysql_query - connection: 0, query: "", use_cache: true
[23:21:32] [ERROR] mysql_query - invalid connection handle (id: 0)
[23:21:32] [DEBUG] cache_get_row_count - connection: 0
[23:21:32] [DEBUG] cache_delete - cache_id: 0, connection: 0
[23:21:32] [ERROR] cache_delete - invalid connection handle (id: 0)
Код HTML:
public LoadBizz()
{
new i, query[256], index;
new Cache:result;
mysql_format(Handle, query, sizeof(query), "SELECT * FROM `bizz` ORDER BY `bizz`.`ID` ASC");
result = mysql_query(Handle, query);
while(cache_get_row_count(Handle))
{
i++;
BizzInfo[i][bOwned] = cache_get_field_content_int(i, "Owned");
cache_get_field_content(i, "Owner", BizzInfo[i][bOwner]);
cache_get_field_content(i, "Message", BizzInfo[i][bMessage]);
cache_get_field_content(i, "Extortion", BizzInfo[i][bExtortion]);
BizzInfo[i][bEntranceX] = cache_get_field_content_float (i, "EntX");
BizzInfo[i][bEntranceY] = cache_get_field_content_float (i, "EntY");
BizzInfo[i][bEntranceZ] = cache_get_field_content_float (i, "EntZ");
BizzInfo[i][bExitX] = cache_get_field_content_float (i, "ExitX");
BizzInfo[i][bExitY] = cache_get_field_content_float (i, "ExitY");
BizzInfo[i][bExitZ] = cache_get_field_content_float (i, "ExitZ");
BizzInfo[i][bLevelNeeded] = cache_get_field_content_int(i, "Level");
BizzInfo[i][bBuyPrice] = cache_get_field_content_int(i, "Price");
BizzInfo[i][bEntranceCost] = cache_get_field_content_int(i, "EPrice");
BizzInfo[i][bTill] = cache_get_field_content_int(i, "Till");
BizzInfo[i][bLocked] = cache_get_field_content_int(i, "Locked");
BizzInfo[i][bInterior] = cache_get_field_content_int(i, "Interior");
BizzInfo[i][bProducts] = cache_get_field_content_int(i, "Products");
BizzInfo[i][bMaxProducts] = cache_get_field_content_int(i, "MaxProducts");
BizzInfo[i][bPriceProd] = cache_get_field_content_int(i, "ProductPrice");
}
cache_delete(result, Handle);
printf("[BIZZ]Au fost incarcate %d bizz-uri.Felicitari pentru reusita.[PG-ZONE.RO]", index);
return 1;
}
Re: Not load bizz -
Aly - 25.09.2015
PHP код:
mysql_format(Handle, query, sizeof(query), "SELECT * FROM `bizz` ORDER BY `ID` ASC");
Re: Not load bizz -
Jimmi - 25.09.2015
Nop
Код:
[23:42:13] [DEBUG] mysql_format - connection: 0, len: 256, format: "SELECT * FROM `bizz` ORDER BY `ID` ASC"
[23:42:13] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:42:13] [DEBUG] mysql_query - connection: 0, query: "", use_cache: true
[23:42:13] [ERROR] mysql_query - invalid connection handle (id: 0)
[23:42:13] [DEBUG] cache_get_row_count - connection: 0
[23:42:13] [DEBUG] cache_delete - cache_id: 0, connection: 0
[23:42:13] [ERROR] cache_delete - invalid connection handle (id: 0)
Re: Not load bizz -
Aly - 25.09.2015
Are you setting the "Handle" value under ongamemodeinit like this?
PHP код:
public OnGameModeInit()
{
Handle = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
}
Re: Not load bizz -
Jimmi - 25.09.2015
Does. I have in any other way. Anyway it's well connected to the database as read accounts and debris ...
Re: Not load bizz -
Aly - 25.09.2015
Try it like this:
PHP код:
format(query, sizeof(query), "SELECT * FROM `bizz` ORDER BY `ID` ASC");
result = mysql_query(Handle, query);
Re: Not load bizz -
Jimmi - 25.09.2015
[00:01:04] [DEBUG] mysql_query - connection: 0, query: "SELECT * FROM `bizz` ORDER BY `ID` ASC", use_cache: true
[00:01:04] [ERROR] mysql_query - invalid connection handle (id: 0)
[00:01:04] [DEBUG] cache_get_row_count - connection: 0
[00:01:04] [DEBUG] cache_delete - cache_id: 0, connection: 0
[00:01:04] [ERROR] cache_delete - invalid connection handle (id: 0)
nop