13.04.2019, 17:13
Hello,
I am currently trying to upgrade my server from R7 to 41. I do not get how mysql_function_query has changed and what it has changed into
This is my code before -
And this is what I've changed it into. This works but doesn't load certain stuff, it also crashes when a player leaves. I'm not too sure how to update from mysql_function_query
Before anyone lets me know "use the search bar". I have done quite a bit of searching and cannot work out out, although I may just be blind. Thanks!
P.S. I apologise if this is a "noob question"
I am currently trying to upgrade my server from R7 to 41. I do not get how mysql_function_query has changed and what it has changed into
This is my code before -
pawn Code:
format(String,sizeof(String),"UPDATE `accounts` SET `Level`=%d,`AdminLevel`=%d,`Money`=%d,`TruckingLicense`=%d,`Job`=%d,`Hours`=%d,`Minutes`=%d,`FishBag`=%d WHERE Name = '%s' LIMIT 1",
GetPlayerLevel(playerid),PlayerData[playerid][AdminLevel],PlayerData[playerid][Cash],PlayerData[playerid][TruckingLicense],PlayerData[playerid][Job],PlayerData[playerid][Hours],PlayerData[playerid][Minutes],PlayerData[playerid][FishBag],GetName(playerid));
mysql_function_query(1,String,false,"","");
pawn Code:
#define mysql_function_query(%0,%1,%2,%3,"%4"%5) mysql_tquery(%0,%1,%3,#%4%5)
#define DB mysql_connect(SQL_HOST,SQL_USER,SQL_PASS,SQL_DB)
format(String,sizeof(String),"UPDATE `accounts` SET `Level`=%d,`AdminLevel`=%d,`Money`=%d,`TruckingLicense`=%d,`Job`=%d,`Hours`=%d,`Minutes`=%d,`FishBag`=%d WHERE Name = '%s' LIMIT 1",
GetPlayerLevel(playerid),PlayerData[playerid][AdminLevel],PlayerData[playerid][Cash],PlayerData[playerid][TruckingLicense],PlayerData[playerid][Job],PlayerData[playerid][Hours],PlayerData[playerid][Minutes],PlayerData[playerid][FishBag],GetName(playerid));
mysql_function_query(DB,String,false,"","");
P.S. I apologise if this is a "noob question"