AsYetUntitled / Framework

Altis Life RPG mission framework for Arma 3 originally made by @TAWTonic.
Other
245 stars 308 forks source link

IS YOUR SERVER BROKEN SINCE 1.64 UPDATE? READ THIS #104

Closed BoGuu closed 7 years ago

BoGuu commented 8 years ago

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.cpp

https://gist.github.com/BoGuu/c552b652f752378f06a42c809150032e

Over time they should fix themselves, and you can revert back to the original.

setoy commented 8 years ago

Hmm, have applied this to my server but the error still persists... Same error in the log files.

tkcjesse commented 8 years ago

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.

setoy commented 8 years ago

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.

riskingfusion commented 8 years ago

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 ?

tkcjesse commented 8 years ago

If you're using the HC you need to update that file as well...

tkcjesse commented 8 years ago

@setoy your error clearly says : DB_fnc_mresToArray

vabene1111 commented 8 years ago

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

tkcjesse commented 8 years ago

Dark has it working fine on 4.5 - https://i.gyazo.com/e3649b70802132e4c9faee2bb355bba1.png

riskingfusion commented 8 years ago

@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 ?

riskingfusion commented 8 years ago

We are using 4.4

allstar-uk commented 8 years ago

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.

riskingfusion commented 8 years ago

@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 ?

setoy commented 8 years ago

your error clearly says : DB_fnc_mresToArray

Yeah, but that file wasn't changed / fixed / whatever

BoGuu commented 8 years ago

If you are having problems post your mresArray and mresToArray, please

setoy commented 8 years ago

mresArray: http://hastebin.com/fivakevexo.cpp

mresToArray: http://hastebin.com/xemugacezi.cpp

riskingfusion commented 8 years ago

fn_mresArray.sqf http://pastebin.com/A6zrQhXb

fn_mresToArray http://pastebin.com/i0urCVYq

TMschar commented 8 years ago

I get these errors when joining after applying @tkcjesse fix.

http://hastebin.com/xivobukafi.bash

ace16huey commented 8 years ago

That SQL command is changing all the empty strings to have one ` instead of the 2 needed.

riskingfusion commented 8 years ago

@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

ace16huey commented 8 years ago

@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.

riskingfusion commented 8 years ago

@ace16huey Oh right. Thats why you make backups :P

rebornfuel commented 8 years ago

any news on a fix or 4.4r3? as the current changes to fn_mresArray.sqf does not fix a thing

ace16huey commented 8 years ago

@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:

riskingfusion commented 8 years ago

@rebornfuel not currently I think most of us are waiting on a fix for a similar issue

riskingfusion commented 8 years ago

@ace16huey I think they give everyone bad luck xD

harmdhast commented 8 years ago

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 '"[``%'
ace16huey commented 8 years ago

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.

harmdhast commented 8 years ago

Please note the Where.

riskingfusion commented 8 years ago

@harmdhast I am going to test it on my server now

rebornfuel commented 8 years ago

dont bother it only fixes it for seconds, the issue comes back

harmdhast commented 8 years ago

The mresarray fix works like a charm.

riskingfusion commented 8 years ago

@harmdhast What version you on ?

rebornfuel commented 8 years ago

what version you on?

rebornfuel commented 8 years ago

4.4r3 it does nothing

riskingfusion commented 8 years ago

I am on 4.4 and it just comes back after re-log

harmdhast commented 8 years ago

@rebornfuel Are you sure you applied the https://github.com/AsYetUntitled/Framework/commit/db66e545ef02faec2a2e9fd152eb5260b3deab8a ? Worked on 4.4r3 AND v3.1.4.8

rebornfuel commented 8 years ago

yeah its applied im taking my server down to test

ace16huey commented 8 years ago

@rebornfuel Okay, I see what you did now, the where would need to be in the selected column,

UPDATEplayers SETciv_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

harmdhast commented 8 years ago

Basicly the SQL that I provided checks the aliases column if it is corrupted then fixes the entire line.

harmdhast commented 8 years ago

Since I only had a player table corrupted I can't provide any more scripts for other versions nor tables

ace16huey commented 8 years ago

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

harmdhast commented 8 years ago

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.

ace16huey commented 8 years ago

This is a v3 table. 3.1.4.8 to be exact. But I will look into it more

harmdhast commented 8 years ago

That's strange did you tried to fix it before applying my script ? It's not supposed to be only double quotes.

ace16huey commented 8 years ago

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

harmdhast commented 8 years ago

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.

setoy commented 8 years ago

You could dump the DB and do regex replaces in Notepad++ or such (:

harmdhast commented 8 years ago

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)

angryfatty commented 8 years ago

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

BoGuu commented 8 years ago

@setoy what exactly is your error? @riskingfusion You haven't applied the fix