TEMPEST.114 Posted February 20, 2023 Posted February 20, 2023 I have a table of id numbers. Every time I do a new 'mark' I increment the last ID number by 1. When the script needs to remove all marks, it does a for loop where for id = 1, #activeDrawings do trigger.action.removeMark(id) activeDrawings[id] = nil end This wipes the table 'activeDrawings' empty. Then later, if the script adds a new 'mark' it will obviously restart at 1 (as all previous ID's have been removed and deleted). However, DCS Backend won't render the mark. It won't render any more marks until the new ID number is one more than the previous max ID numbers before my table of used ID numbers was wiped. This means the backend is retaining what ID numbers were used, and despite 'removeMark(id)' it doesn't 'free' that up for reuse. Thus, until this is fixed my table of used ID numbers has to keep increasing forever. 1
Chump Posted February 20, 2023 Posted February 20, 2023 It would be great to free up these IDs. I think the way that most of us use this is to choose a high arbitrary starting ID that won't conflict with other marks (from other scripts, users, etc.). +1 to get a new API method for this
funkyfranky Posted February 20, 2023 Posted February 20, 2023 (edited) Interesting, I did not know the mark ids could not be reused. Certainly something to watch out for. Edited February 20, 2023 by funkyfranky A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
buur Posted February 20, 2023 Posted February 20, 2023 You are not the only one creating IDs. And with your loop you also deleting IDs from other players or scripts. So you have to test if every ID is yours. Or... you do not delete them. So your request makes no sense.
TEMPEST.114 Posted February 22, 2023 Author Posted February 22, 2023 On 2/20/2023 at 10:28 PM, buur said: You are not the only one creating IDs. And with your loop you also deleting IDs from other players or scripts. So you have to test if every ID is yours. Or... you do not delete them. So your request makes no sense. Wrong. Because I create a mark using ID number 1. It shows on the map. I remove it using trigger.action.removeMark(1). It goes away. Then I create a new mark on the map using ID number 1. The 'event' table says 'mark added' but nothing renders. If I increment it to 2 then it renders and I can remove it. If I try later to add another mark, now with either 1 or 2 they wont render, but 3 will. So on, so on.
Flappie Posted February 22, 2023 Posted February 22, 2023 Hi @Elphaba . Can you please attach an example mission showing the issue? ---
TEMPEST.114 Posted February 22, 2023 Author Posted February 22, 2023 5 hours ago, Flappie said: Hi @Elphaba . Can you please attach an example mission showing the issue? You don't allow missions with scripts in and this happens from scripting so...
Grimes Posted February 23, 2023 Posted February 23, 2023 Reported Sep 2021. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Flappie Posted February 23, 2023 Posted February 23, 2023 7 hours ago, Elphaba said: You don't allow missions with scripts in and this happens from scripting so... I don't know what made you think this. When reporting a script issue, the best way to get the issue reported is to attach a miz containing the malfunctioning script. ---
ED Team BIGNEWY Posted February 23, 2023 ED Team Posted February 23, 2023 this has been reported earlier. Please in the future include a track replay or mission example thank you Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
Recommended Posts