acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
1.02k stars 739 forks source link

Error in inventoryDisplayLoad file when opening custom inventory #8339

Closed th3-sh0w3r closed 3 years ago

th3-sh0w3r commented 3 years ago

Mods (complete and add to the following information):

Description: If you open a custom inventory but it has none of the following item list IDs this error appears, because fnc_currentItemListBox.sqf returns -1:

#define IDC_ITEMLIST_GROUND 632
#define IDC_ITEMLIST_SOLDIER 640
#define IDC_ITEMLIST_UNIFORM 633
#define IDC_ITEMLIST_VEST 638
#define IDC_ITEMLIST_BACKPACK 619
if (_itemList lbValue 0 != 127) then {
_display call a>
 3:22:22   Error position: <lbValue 0 != 127) then {
_display call a>
 3:22:22   Error lbvalue: Type Number, expected Control
 3:22:22 Error in expression <fnc_currentItemListBox;

Steps to reproduce: _Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_ None

Expected behavior: A clear and concise description of what you expected to happen.

Where did the issue occur?

Log Files: None

Additional context: None

Screenshots: None

PabstMirror commented 3 years ago

Do you have an example of how to reproduce this? I'm not sure what kind of inventory wouldn't fit into the existing categories.

PR #8340 should fix the script error but I'm not sure if it really fixes the problem

BaerMitUmlaut commented 3 years ago

Reproduction steps and mod list are missing.

th3-sh0w3r commented 3 years ago

Reproduction steps and mod list are missing.

There are not really steps, just opening the inventory. This is the inventory: https://armaservices.net/product/extended-gear/

Mod list is at the beginning. Is there a way to disable this inventory check for specific inventories?

BaerMitUmlaut commented 3 years ago

How are we supposed to test that? We're not going to pay for some random Altis Life script.

PabstMirror commented 3 years ago

I think my fix will work, on custom display's it will just return a null, which won't throw script error and the rest of the code just won't do anything.

PabstMirror commented 3 years ago

Let us know if this is still an issue after next release

th3-sh0w3r commented 3 years ago

How are we supposed to test that? We're not going to pay for some random Altis Life script.

I didn't say that, I think the it is obvious what the error was. I will let you know if it works.

commy2 commented 3 years ago

I think the it is obvious what the error was.

It's not, which is why people ask for repro steps.

th3-sh0w3r commented 3 years ago

I think the it is obvious what the error was.

It's not, which is why people ask for repro steps.

Sorry but if you go through the files I mentioned above and take look at the error message, it is very obvious.

commy2 commented 3 years ago

If it is so obvious to you, why not create a pull request that solves the issue - whatever it may be.

th3-sh0w3r commented 3 years ago

If it is so obvious to you, why not create a pull request that solves the issue - whatever it may be.

I even said what the problem is and it was instantly fixed by @PabstMirror. I don‘t understand for what you would need steps to reproduce if it‘s that obvious. I didn‘t create a pull request because I wanted to inform you what is going on.

commy2 commented 3 years ago

He doesn't know if it is fixed, which is why he asked you to test it yourself after the next patch / change of his. (i.e. try to reproduce it)

Sorry, but posting the repro steps is required to report an issue here, no matter how obvious it all seems to you. It's weird to me that this is so much of a problem to you.

th3-sh0w3r commented 3 years ago

He doesn't know if it is fixed, which is why he asked you to test it yourself after the next patch / change of his. (i.e. try to reproduce it)

Sorry, but posting the repro steps is required to report an issue here, no matter how obvious it all seems to you. It's weird to me that this is so much of a problem to you.

As I said I just wanted to inform you. I already fixed it by myself based on what @PabstMirror did and it worked. It should not only be obvious to me lol… I don‘t have any problem to list my repro steps but as I also said there are not really steps to reproduce this.