Problem while loading bussnieses from 'biz' table [MySQL]
#1

Hello , first of all i wanna tell u that i'm sorry for my bad english, now let me tell u my problem:
original biz number was 8, in database -> biz table
i've tryed to make a new biz, with id 9 but after restarting the GM will no longer load ...
if i delete from mysql database biz with id 9 and restart again , the server will work perfectly ..

Код:
Functie LoadBizz()
{
	new result[100],index = 0;
    mysql_query(SQL,"SELECT * FROM `bizz` ORDER BY `bizz`.`ID` ASC");
    mysql_store_result();
    while(mysql_retrieve_row())
    {
        bussines++;
		index++;
		new i = index;
		mysql_get_field("ID", result);				BizzInfo[i][bID] = strval(result);
        mysql_get_field("Owned", result);			BizzInfo[i][bOwned] = strval(result);
        mysql_get_field("Owner", result);			strmid(BizzInfo[i][bOwner], result, 0, 32, 32);
        mysql_get_field("Message", result);			strmid(BizzInfo[i][bMessage], result, 0, 100, 100);
   	    mysql_get_field("EntranceX", result);		BizzInfo[i][bEntranceX] = floatstr(result);
    	mysql_get_field("EntranceY", result);		BizzInfo[i][bEntranceY] = floatstr(result);
        mysql_get_field("EntranceZ", result);		BizzInfo[i][bEntranceZ] = floatstr(result);
        mysql_get_field("ExitX", result);			BizzInfo[i][bExitX] = floatstr(result);
        mysql_get_field("ExitY", result);			BizzInfo[i][bExitY] = floatstr(result);
        mysql_get_field("ExitZ", result);			BizzInfo[i][bExitZ] = floatstr(result);
        mysql_get_field("LevelNeeded", result);		BizzInfo[i][bLevelNeeded] = strval(result);
        mysql_get_field("BuyPrice", result);		BizzInfo[i][bBuyPrice] = strval(result);
        mysql_get_field("EntranceCost", result);	BizzInfo[i][bEntranceCost] = strval(result);
        mysql_get_field("Till", result);			BizzInfo[i][bTill] = strval(result);
        mysql_get_field("Locked", result);			BizzInfo[i][bLocked] = strval(result);
        mysql_get_field("Interior", result);		BizzInfo[i][bInterior] = strval(result);
        mysql_get_field("Products", result);		BizzInfo[i][bProducts] = strval(result);
        mysql_get_field("MaxProducts", result);		BizzInfo[i][bMaxProducts] = strval(result);
        mysql_get_field("PriceProd", result);		BizzInfo[i][bPriceProd] = strval(result);
        mysql_get_field("Virtual", result);			BizzInfo[i][bVirtual] = strval(result);
	}
	mysql_free_result();
	printf("Bussines: %d", index);
	return 1;
}
and "LoadBizz();" in "OnGameModeInit" .....
Reply
#2

What version of mysql are you running on? and could you post your mysql_log?
Reply
#3

R39

Solved, i had to declare first the new biz id
Reply
#4

Alright, fair enough and also.. You're not running on R39 if you're using them functions... unless it is custom, because most of them such as mysql_free_result and mysql_get_field
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)