Jump to content

[2.5.3.24436] addStaticObject creates object with wrong ID


Whisper

Recommended Posts

Stumbled on this one, not sure how long it exists, at least true on latest version 2.5.3.24436

 

When using coalition.addStaticObject, and then using :getID() on this object, instead of having an integer returned, the result is a string containing the static name

:getID() on static placed in ME returns an integer, as expected.

 

Repro mission attached. Launch mission, drop on Game Master slot, wait 5 seconds, a second Warehouse appears west of the first one, with a marker on it. The marker contains the result of a :getID() on the newly spawned Warehouse, and it's a string

addStatic-bug.miz


Edited by Whisper

Whisper of old OFP & C6 forums, now Kalbuth.

Specs : i7 6700K / MSI 1070 / 32G RAM / SSD / Rift S / Virpil MongooseT50 / Virpil T50 CM2 Throttle / MFG Crosswind.

All but Viggen, Yak52 & F16

Link to comment
Share on other sites

Issue appears to stem from the unitID not being unique or specified. If the unitId is set to 2 it'll be fine. But if the unitID is 1 or commented out then the bug will occur. Good find.

 

Thankfully it appears to be limited to static objects.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

That's adding a bit of work when you copy unit information from existing template. Gonna see what can be done

Whisper of old OFP & C6 forums, now Kalbuth.

Specs : i7 6700K / MSI 1070 / 32G RAM / SSD / Rift S / Virpil MongooseT50 / Virpil T50 CM2 Throttle / MFG Crosswind.

All but Viggen, Yak52 & F16

Link to comment
Share on other sites

  • 5 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...