stock loadBusiness(){ new Query[1024], BizzName, Float:Pos[3], Price, Sell, Earnings; mysql_query("SELECT * FROM `Business` WHERE `BizID` < "#MAX_BUSINESS" ORDER BY BizID"); mysql_store_result(); if(mysql_num_rows() > 0) { while(mysql_fetch_row(Query)) { sscanf(Query, "p<|>is[26]fffiii", BizID, BizzName, Pos[0], Pos[1], Pos[2], Price, Sell, Earnings); printf("ID:%i\t", BizID); BizzInfo[BizID][BizName] = BizzName; printf("Name:%s\t", BizzName); format(BizzInfo[BizID][BizName], 60, "%s", BizzName); BizzInfo[BizID][BizX] = Pos[0]; printf("X:%f\t", Pos[0]); BizzInfo[BizID][BizY] = Pos[1]; printf("Y:%f\t", Pos[1]); BizzInfo[BizID][BizZ] = Pos[2]; printf("Z:%f\t", Pos[2]); BizzInfo[BizID][BizPrice] = Price; printf("Price:$%i\t", Price); BizzInfo[BizID][BizSell] = Sell; printf("Sell:$%i\t", Sell); BizzInfo[BizID][BizEarning] = Earnings; printf("Earnings:$%i\t\t", Earnings); BizPickup[BizID] = CreatePickup(1272, 1, Pos[0], Pos[1], Pos[2]); BizzInfo[BizID][BizExists] = 1; BizzInfo[BizID][BizIsEnabled] = 1; if(PayoutTimer == -1) { PayoutTimer = SetTimer("BizPayout", (BizPayoutFrequency*1000), 1); for(new i=1; i<MAX_BUSINESS; i++) { BizzInfo[i][BizOwner] = -1;}} ++ Total_Biz_Created;}} mysql_free_result(); print("\n=============================================================="); printf("** A total of: \"%i\" Business(s) were loaded!", Total_Biz_Created); print("==============================================================\n"); return Total_Biz_Created;}
[22:22:27] CMySQLHandler::FetchRow() - Return: 130|Popes Holy Hideaway|2491.38|918.52|20.79|870000|391737|18000
[08/01/2012 22:22:54] ** A total of: "126" Business(s) were loaded!
In your sscanf statement BizzName is marked as a string, but you have initialized it as an integer.
|
sscanf(Query, "p<|>is[26]fffiii"