Closed preister closed 9 years ago
I put a fix for this in, hasn't broken anything on my local so I would say its good. The issue seems to be that its trying to overwrite a constant which in this case is the SQL session id which shouldn't change after the mod has initialized.
Before I forget to mention it the fix for this is on the server side so requires the life_server.pbo to be build, I tested the scripts and all works fine.
Strange. I hadn't noticed it before, but then again I only check the logs if I have a specific problem usually.
Onz had some issues logging in before and as far as I could read his murmuring it looked quite similar to the user experience I had on the client when this happened ... so this whole thing is mostly based on suspicions :(
I tend not to believe stuff until i see it for myself due to the large amount of issues that have ended up being user error :P
Oh well PEBCAK is always the best ;)
Part of #68
Added in some logging while removing my Fix again and and it looks like this issue is related to some snaffuu in the DB_fnc_asyncCall:
"SERVER DEBUG: ASYNC Query Result: [1,[1,[[0]]]]"
Error in expression <RE owned='1'",2] call DB_fnc_asyncCall) select 0;
for [{_x=0},{_x<=_count},{_x=>
Error position: <select 0;
for [{_x=0},{_x<=_count},{_x=>
Error select: Type Number, expected Array,String,Config entry
File life_server\Functions\Housing\fn_initHouses.sqf, line 9
"SERVER DEBUG: ASYNC Query Result: [1,[1,[["76561197970700911","SrgFlip",1250,4.67825e+007,"0","0","[[`license_civ_driver`,1],[`license_civ_air`,1],[`license_civ_heroin`,0],[`license_civ_marijuana`,0],[`license_civ_gang`,0],[`license_civ_boat`,1],[`license_civ_oil`,0],[`license_civ_dive`,0],[`license_civ_truck`,1],[`license_civ_gun`,1],[`license_civ_rebel`,0],[`license_civ_coke`,0],[`license_civ_diamond`,0],[`license_civ_copper`,0],[`license_civ_iron`,0],[`license_civ_platinum`,0],[`license_civ_salt`,0],[`license_civ_cement`,0],[`license_civ_home`,1],[`license_civ_meth`,0],[`license_civ_moonshine`,0]]",0,"[`U_C_Poloshirt_blue`,``,``,``,``,[`ItemMap`,`ItemCompass`,`ItemWatch`],``,`hgun_ACPC2_F`,[],[`9Rnd_45ACP_Mag`],[],[],[],[],[],[``,``,``],[]]"]]]]"
"------------- Client Query Request -------------"
"QUERY: SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid='76561197970700911'"
"Time to complete: 0.0529785 (in seconds)"
"Result: 1"
"------------------------------------------------"
Error in expression <D,false,true] spawn life_fnc_MP;
};
if(count _queryResult == 0) exitWith {
[[],>
Error position: <count _queryResult == 0) exitWith {
[[],>
Error count: Type Number, expected Array,String,Config entry
File life_server\Functions\MySQL\fn_queryRequest.sqf, line 45
it looks like the query result returned is not which should be returned to the call.
This might be fixed in the .8 update but I want to keep an eye on this, DB snaffuuu is no fun :(
and yes indeed that is the case, mode 2 Queries are getting mode 1 results as it seems.
"------------- Async Query : 2 -------------"
"QUERY: SELECT COUNT(*) FROM houses WHERE owned='1'"
"Result: 1"
"-------------------------------------------"
Error in expression <RE owned='1'",2] call DB_fnc_asyncCall) select 0;
for [{_x=0},{_x<=_count},{_x=>
Error position: <select 0;
for [{_x=0},{_x<=_count},{_x=>
Error select: Type Number, expected Array,String,Config entry
File life_server\Functions\Housing\fn_initHouses.sqf, line 9
"------------- Async Query : 2 -------------"
"QUERY: SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid='76561197970700911'"
"Result: 1"
"-------------------------------------------"
"------------- Client Query Request -------------"
"QUERY: SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid='76561197970700911'"
"Time to complete: 0.0280151 (in seconds)"
"Result: 1"
"------------------------------------------------"
Error in expression <D,false,true] spawn life_fnc_MP;
};
if(count _queryResult == 0) exitWith {
[[],>
Error position: <count _queryResult == 0) exitWith {
[[],>
Error count: Type Number, expected Array,String,Config entry
File life_server\Functions\MySQL\fn_queryRequest.sqf, line 45
time to look at .8 and see if its fixed there.
On 2nd though I'm taking all of this back .... and we are back at square 1
Now we are getting somewhere, the result is correct but we still end up returning something wrong.
"------------- Async Query : 2 -------------"
"SQLID: {4720}"
"QUERY: SELECT COUNT(*) FROM houses WHERE owned='1'"
"Result: [1,[1,[[0]]]]"
"Return: 1"
"-------------------------------------------"
Error in expression <RE owned='1'",2] call DB_fnc_asyncCall) select 0;
for [{_x=0},{_x<=_count},{_x=>
Error position: <select 0;
for [{_x=0},{_x<=_count},{_x=>
Error select: Type Number, expected Array,String,Config entry
File life_server\Functions\Housing\fn_initHouses.sqf, line 9
"------------- Async Query : 2 -------------"
"SQLID: {4720}"
"QUERY: SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid='76561197970700911'"
"Result: [1,[1,[["76561197970700911","SrgFlip",10402,4.67804e+007,"0","0","[[`license_civ_driver`,1],[`license_civ_air`,1],[`license_civ_heroin`,0],[`license_civ_marijuana`,0],[`license_civ_gang`,0],[`license_civ_boat`,1],[`license_civ_oil`,0],[`license_civ_dive`,0],[`license_civ_truck`,1],[`license_civ_gun`,1],[`license_civ_rebel`,0],[`license_civ_coke`,0],[`license_civ_diamond`,0],[`license_civ_copper`,0],[`license_civ_iron`,0],[`license_civ_platinum`,0],[`license_civ_salt`,0],[`license_civ_cement`,0],[`license_civ_home`,1],[`license_civ_meth`,0],[`license_civ_moonshine`,0]]",0,"[`U_C_Poloshirt_blue`,``,``,``,``,[`ItemMap`,`ItemCompass`,`ItemWatch`],``,`hgun_ACPC2_F`,[],[`9Rnd_45ACP_Mag`],[],[],[],[],[],[``,``,``],[]]"]]]]"
"Return: 1"
"-------------------------------------------"
"------------- Client Query Request -------------"
"QUERY: SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid='76561197970700911'"
"Time to complete: 0.0379944 (in seconds)"
"Result: 1"
"------------------------------------------------"
Error in expression <D,false,true] spawn life_fnc_MP;
};
if(count _queryResult == 0) exitWith {
[[],>
Error position: <count _queryResult == 0) exitWith {
[[],>
Error count: Type Number, expected Array,String,Config entry
File life_server\Functions\MySQL\fn_queryRequest.sqf, line 45
And I found it, the extDBVersion variable does not get set properly on reloading ...
"------------- Async Query : 2 -------------"
"SQLID: {4918}"
"QUERY: SELECT COUNT(*) FROM houses WHERE owned='1'"
"Result: [1,[1,[[0]]]]"
"Return: 1"
"MultiArr: false"
"extDBVer: "
"-------------------------------------------"
This is how it should look like:
"------------- Async Query : 2 -------------"
"SQLID: {4918}"
"QUERY: SELECT COUNT(*) FROM houses WHERE owned='1'"
"Result: [1,[[0]]]"
"Return: [0]"
"MultiArr: false"
"extDBVer: 17"
"-------------------------------------------"
there is a check for this but its at the wrong place it seems.
After all this work I've realized this will be all a non issue in .8 ... everything switches over to DB_RAW_V2 ... no more support for extDB version less than 14.
just checking if you have seen this already on the life server @CeltS-Dubbz261 :