Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container bugfix #653

Merged
merged 8 commits into from
Jun 1, 2020
Merged

Conversation

DomT602
Copy link
Member

@DomT602 DomT602 commented Apr 30, 2020

Resolves #601 (on master branch)

Changes proposed in this pull request:

  • When player disconnects, sets the 'containers' variable on owned houses to nil

  • I have tested my changes and corrected any errors found

@DomT602 DomT602 self-assigned this Apr 30, 2020
@DomT602 DomT602 added 6.0.0 bug-fix For pull requests that fix a bug or other issue. labels Apr 30, 2020
@ghost
Copy link

ghost commented May 19, 2020

doesn'T work in current master branch commit a5a5821
`Error in expression <syncCall;

{
_x params ["_pos"];
_pos = parseSimpleArray _pos;
private _house = >
Error position: <parseSimpleArray _pos;
private _house = >
Error parsesimplearray: Type Array, expected String
File \life_server\Functions\Housing\fn_houseCleanup.sqf [TON_fnc_houseCleanup]..., line 16`

@ghost
Copy link

ghost commented May 19, 2020

error seems to be in AL.ini
the PR has this
[selectHousesCleanup] SQL1_1 = SELECT pos FROM houses WHERE pid = ? SQL1_INPUTS = 1 OUTPUT = 1
but as parseSimpleArray expects a string the output has to set to "1-STRING" like this:
[selectHousesCleanup] SQL1_1 = SELECT pos FROM houses WHERE pid = ? SQL1_INPUTS = 1 OUTPUT = 1-STRING
then this works and resolvs the dup bug

@DomT602
Copy link
Member Author

DomT602 commented May 20, 2020

Hi @cryptearth thanks for the comments and getting this tested. Good spot on the error and a suggested fix, however an even better fix is just to remove the parseSimpleArray usage - as SQL Custom can give us an array as an array (rather then a string as we did before). This will be the best way forward.
Would you be able test the fix I have done in the below commit?

@ghost
Copy link

ghost commented May 20, 2020

So, as I'm at my sisters wedding only using my notebook I had to quickly write my own PBO packer https://github.com/cryptearth/pbopacker (edit: ok, I guess that was waste of time: I could had just used FileBank from Arma3 tools) - pulled latest master commit 99e05e8 - quickly patched in your latest edits - and uploaded to my server.
From as far as I tested it works the same as my idea with change the return type to string and perform the array parse - but as extdb already returns an array your removal of the parsing effectively does the same - so it works the same - no issues, no duping of creates / vItems - from my test ready to merge.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested as pulled from master 99e05e8 - works as intended

@ghost
Copy link

ghost commented May 23, 2020

Any reaso why this wasn't merged yet?

@Jason2605 Jason2605 merged commit d6b0676 into AsYetUntitled:master Jun 1, 2020
@DomT602 DomT602 deleted the containerBugMaster branch June 2, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0.0 bug-fix For pull requests that fix a bug or other issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants