Skip to content

Container bugfix - #653

Merged
Jason2605 merged 8 commits into
AsYetUntitled:masterfrom
DomT602:containerBugMaster
Jun 1, 2020
Merged

Jason2605 merged 8 commits into
AsYetUntitled:masterfrom
DomT602:containerBugMaster

Conversation

@DomT602

@DomT602 DomT602 commented Apr 30, 2020 •

Copy link
Copy Markdown
Member

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

ghost commented May 19, 2020

Copy link
Copy Markdown

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

ghost commented May 19, 2020

Copy link
Copy Markdown

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

DomT602 commented May 20, 2020 •

Copy link
Copy Markdown
Member Author

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

ghost commented May 20, 2020 •

Copy link
Copy Markdown

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.

@ghost ghost left a comment

Copy link
Copy Markdown

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

ghost commented May 23, 2020

Copy link
Copy Markdown

Any reaso why this wasn't merged yet?

@ghost ghost mentioned this pull request Jun 1, 2020
1 task done
@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