23.03.2012, 01:57
Hello, i have this code:
In debug file everything is Ok, price is '500000', but when i use ingame command, which includes:
Then the price is '0'
So, with one world, stats what i load from mysql is not in enum's.
Код:
public LoadCars() { new sql[256], Data[128] ; format(sql, sizeof(sql), "SELECT * FROM `cars`"); mysql_query(sql); new load = 0; mysql_store_result(); while(mysql_retrieve_row()) { mysql_fetch_field_row(Data, "Price"); CarInfo[load][Price] = strval(Data); .... load++; } printf("Loaded %d cars", load); }
Код:
format( string, sizeof( string ), "Car Price: %d", CarInfo[GetPlayerVehicleID(playerid)][Price]); SendClientMessage( playerid, -1, string );
So, with one world, stats what i load from mysql is not in enum's.