The index used by the GetInCargo action is the config index, not cargo index. It should be the cargo index (to comply with the wiki, getInTurret action, and the moveInCargo command),
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Sometimes
- Operating System
- Windows 10 x64
- Category
- Scripting
Steps To Reproduce
- Create a "Van (Cargo)" vehicle in 3den (name it "van") and spawn an AI too (name it "ai")
- Run this script:
[] spawn { ai action ["getInCargo", van, 3]; sleep 2; systemChat str (fullCrew [van, "cargo", false] param [0,[]] param [2, -1]) };
- It prints 5 instead of 3 (which is what I passed to the action). The cargo array for this vehicle is [0,3,4,5,6,9] (and 5 is indeed at index 3)