Closed BoGuu closed 7 years ago
Hmm, have applied this to my server but the error still persists... Same error in the log files.
I mean did you clear the column if you already joined?
Like if the column still has `` you need to fix that lmfao.
@DarkSilencerZA Can you confirm this fixed it for 4.5? As this solution for me is currently running on 3 live servers just fine however they're using 3.1.4.8 but have the exact same code for licenses.
Yeah, I've cleared the columns.
It appears on our modded server as well as on our clean one: http://hastebin.com/eyepabiget.vbs
I've also run the update script and have seen that while the server is running, more rows are getting updated. So even when fixing all columns, 10 minutes later there are more malformed cells. Which indicates there's still that bug somewhere.
When ever I use that query code and execute it, it works but then when they re-join the server it re-appears with the '','' instead of ',' ?? Any fixes ?
If you're using the HC you need to update that file as well...
@setoy your error clearly says : DB_fnc_mresToArray
Any ideas what the reason for this could be:
2016/09/22, 21:26:45 Error in expression <m 0 to (count _old)-1 do { _data = _old select _i; _old set[_i,[_data select 0, > 2016/09/22, 21:26:45 Error position: <select _i; _old set[_i,[_data select 0, > 2016/09/22, 21:26:45 Error Generic error in expression 2016/09/22, 21:26:45 File life_server\Functions\MySQL\fn_queryRequest.sqf, line 70
`
We Updated the mresArray functions and restored the original Database (so no double quotes or anything broken) .. it kinda looks like the array has a different format ? running v4.4
Dark has it working fine on 4.5 - https://i.gyazo.com/e3649b70802132e4c9faee2bb355bba1.png
@tkcjesse I have never had a headless client file so I assume I am not using it. But is there any other ideas that may cause it to almost back track to the '','' instead of ',' even though I used that query code ?
We are using 4.4
It works fine for me. I'm using as close to the main build as possible, but just a ton of customized stuffs.
4.4 seems a little outdated.
@DarkSilencerZA Yeah I had the issue when first updated I used the query code, It works then you disconnect re-log to the server and it is like it back tracks it self so you come back naked. So I am wondering if there was anything else you edited ?
your error clearly says : DB_fnc_mresToArray
Yeah, but that file wasn't changed / fixed / whatever
If you are having problems post your mresArray and mresToArray, please
mresArray: http://hastebin.com/fivakevexo.cpp
mresToArray: http://hastebin.com/xemugacezi.cpp
fn_mresArray.sqf http://pastebin.com/A6zrQhXb
fn_mresToArray http://pastebin.com/i0urCVYq
I get these errors when joining after applying @tkcjesse fix.
That SQL command is changing all the empty strings to have one ` instead of the 2 needed.
@ace16huey Some people are having the problem when they use that when you re-log to the server all them empty strings come back and make you naked again
@riskingfusion I had a player that couldn't spawn in as a civ, I am gonna dump the table and replace them that way and hope for the best. I already messed up the licenses column by working to quick and not checking my work.
@ace16huey Oh right. Thats why you make backups :P
any news on a fix or 4.4r3? as the current changes to fn_mresArray.sqf does not fix a thing
@riskingfusion Had a back up from a couple days ago, applied it and it got corrupted in the process... Arma updates give me the worst luck D:
@rebornfuel not currently I think most of us are waiting on a fix for a similar issue
@ace16huey I think they give everyone bad luck xD
3.1.4.8 players table fix.
UPDATE `players`
SET `cop_licenses` = replace(cop_licenses, '``', '`'),
`civ_licenses` = replace(civ_licenses, '``', '`'),
`med_licenses` = replace(med_licenses, '``', '`'),
`aliases` = replace(aliases, '``', '`'),
`cop_gear` = replace(cop_gear, '``', '`'),
`civ_gear` = replace(civ_gear, '``', '`'),
`med_gear` = replace(med_gear, '``', '`')
WHERE `aliases` LIKE '"[``%'
That might break more then fix to be honest @harmdhast. did that to a couple columns and it cause all the empty strings to break and what not.
Please note the Where.
@harmdhast I am going to test it on my server now
dont bother it only fixes it for seconds, the issue comes back
The mresarray fix works like a charm.
@harmdhast What version you on ?
what version you on?
4.4r3 it does nothing
I am on 4.4 and it just comes back after re-log
@rebornfuel Are you sure you applied the https://github.com/AsYetUntitled/Framework/commit/db66e545ef02faec2a2e9fd152eb5260b3deab8a ? Worked on 4.4r3 AND v3.1.4.8
yeah its applied im taking my server down to test
@rebornfuel Okay, I see what you did now, the where would need to be in the selected column,
UPDATE
players SET
civ_gear= replace(civ_gear, '``', '
')
WHERE civ_gear
LIKE '"[`%'
fixed it for that specific column. I don;t have much knowledge on SQL so thank you.
Edit: rip. read through to quick
Basicly the SQL that I provided checks the aliases column if it is corrupted then fixes the entire line.
Since I only had a player table corrupted I can't provide any more scripts for other versions nor tables
Thats the only table I did do it to, I am about to give a link to 2 pics, then first being before I apply that code
then after
Can you see the issue? Its breaking the empty strings
Yeah, that's a v4 table right ? The script I provided is only for v3 since here you have to manage when it's
[`` or Blaba``
And I don't have a table to test so, I only did it for v3. Or you "fixed" it uncompletely and my script fucks up.
This is a v3 table. 3.1.4.8 to be exact. But I will look into it more
That's strange did you tried to fix it before applying my script ? It's not supposed to be only double quotes.
I have done so many things to it, that I lost track, I am gonna revert and apply the fix again to see if I messed something up
And sadly Mysql does not support regex replace. That why you don't make databases like a web developper when you make a mission used by a whole fukin community.
You could dump the DB and do regex replaces in Notepad++ or such (:
Yeah but this should never happen. And ppl should be aware of encoding and such things when dumping dbs. Just to say that you never dump a database to replace strings. Just think about 10k entries databases (and that's not much)
we got the database fixed but we have a problem with whitelisting as cops the host can join as cop but when I join on the server after whitelisting I spawn naked without spawn screen but when I go back to civ it works fine any suggestions
@setoy what exactly is your error? @riskingfusion You haven't applied the fix
Please make the changes from this commit: db66e545ef02faec2a2e9fd152eb5260b3deab8a, to your life_server/Functions/MySQL/fn_mresArray.sqf. If you use a headless client, change the relevant file in life_hc also.
Update:
If you have malformed entries in your DB (contains ``) then replace your mresToArray with the following:
http://hastebin.com/omikofajej.cpphttps://gist.github.com/BoGuu/c552b652f752378f06a42c809150032e
Over time they should fix themselves, and you can revert back to the original.