He-Man Posted April 16, 2016 Report Share Posted April 16, 2016 Hi, I have noticed a random error while interaction with the Traders. The Message is: Spoiler Error in expression <ursorTarget getVariable['AI_SLOT', -1]) != -1))} else {false};> 0:41:53 Error position: <!= -1))} else {false};> 0:41:53 Error Allgemeiner Fehler in Ausdruck I also got this message on a self written script, that checks all Trader inventory. Anybody an Idea, why ... getVariable['AI_SLOT', -1]) != -1... sometimes give an Error? It happens only on some Traders and not every restart the same Trader!. If I check the AI_Slot by hand (with console), it push me back a valid value. For my own script, I have fixed it by checking the variable AI_Items. But I'm wondering about this problem... Link to comment Share on other sites More sharing options...
vbawol Posted April 16, 2016 Report Share Posted April 16, 2016 Error Allgemeiner Fehler in Ausdruck Error General error in expression This is usually caused by a type mismatch. For example if you use (cursorTarget getVariable['AI_SLOT', -1]) != -1 and if AI_SLOT returns a string at any point you would get this error since you are checking against a number -1. The easy way to prevent the error would be to use isEqualTo !((cursorTarget getVariable['AI_SLOT', -1]) isEqualTo -1) But then again it may not be intended that you are mixing strings and numbers for the AI_SLOT variable so you might want to check that also. Link to comment Share on other sites More sharing options...
He-Man Posted April 16, 2016 Author Report Share Posted April 16, 2016 Okay thanks, but I never set the AI_Slot in my Scripts. I only read the slot out. It must come from the Epoch codes. And you are right. The Trader with the "problem" returns "16" and another Trader returns 5 (without the ""). I have checked the Epoch codes for AI_SLOT, but can find nothing, that can cause this :( Link to comment Share on other sites More sharing options...
He-Man Posted April 17, 2016 Author Report Share Posted April 17, 2016 EPOCH_server_loadTraders.sqf: _traderSlotIndex = EPOCH_TraderSlots pushBack str(_i); and EPOCH_server_spawn_Traders: _slot = EPOCH_TraderSlots deleteAt 0; So the slot becomes a string... only for new spawning traders. vbawol 1 Link to comment Share on other sites More sharing options...
vbawol Posted April 17, 2016 Report Share Posted April 17, 2016 Good catch again! That would explain this https://github.com/EpochModTeam/Epoch/issues/509 issue then. This has been fixed with release of build 0.3.8.0424 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now