Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[Logged] Well... I finally finished Bekaa Valley

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [Logged] Well... I finally finished Bekaa Valley Page: [1]
Login
Message << Older Topic   Newer Topic >>
[Logged] Well... I finally finished Bekaa Valley - 3/11/2020 6:28:15 PM   
Eboreg

 

Posts: 153
Joined: 3/14/2019
Status: offline
...and all I needed to do was fix the code in the "Check each unit for vulnerability to communications jamming" action myself.

In all seriousness, the code in this action has some pretty serious bugs in it including:
* Poor handling of boolean values leading to the scenario thinking there are active comms jammers when there aren't,
* An inability to turn off the comms jamming once you turn them on, and
* A very bizarre usage of VP_GetUnit() despite it being inappropriate leading to memory overflows and crashes.

However, I won't leave you guys hanging when I've already done the hard work fixing the code so I've attached the fixed code I used as a text document.

Attachment (1)

< Message edited by apache85 -- 3/12/2020 6:05:40 AM >
Post #: 1
RE: Well... I finally finished Bekaa Valley - 3/11/2020 7:05:36 PM   
Dimitris


Posts: 12432
Joined: 7/31/2005
Status: offline
Thank you!

I see one of the changes in the code is that you used ScenEdit_GetUnit instead of VP_GetUnit to obtain a handle on each active unit; may I ask why this change?

_____________________________


(in reply to Eboreg)
Post #: 2
RE: Well... I finally finished Bekaa Valley - 3/11/2020 7:31:05 PM   
Eboreg

 

Posts: 153
Joined: 3/14/2019
Status: offline
I had problems with memory overruns in the original scenario causing the autosaves to regurlarly fail, then later the manual saves, then eventually the game. I had a hunch that VP_GetUnit was causing these memory overruns, especially since the comms jamming was causing the amount of total observed units to dwarf the amount of actual units, so I switched it out with ScenEdit_GetUnit. I'm pretty sure that fixed the issue since in my test play of the fixed scenario, only one autosave failed and while the game did crash once, it was recoverable.

(in reply to Dimitris)
Post #: 3
RE: Well... I finally finished Bekaa Valley - 3/11/2020 7:40:28 PM   
Dimitris


Posts: 12432
Joined: 7/31/2005
Status: offline
If you have used the current public beta for testing, we very recently updated the Lua libraries because we had access-violation exceptions in many scripts. This appears to have eliminated such issues, so this might have been a factor.

Thanks again, we will include this improved script on the next update bundle.

_____________________________


(in reply to Eboreg)
Post #: 4
RE: Well... I finally finished Bekaa Valley - 3/12/2020 7:28:38 AM   
michaelm75au


Posts: 12991
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
quote:

ScenEdit_GetUnit vs VP_GetUnit

Both return the unit wrapper so I can't see any issue there.

However, VP_GetUnit() will look up a passed id as a contact and/or an unit.
Not sure why this would be 'inappropriate'. Maybe you meant inefficient as it only needed to look at units and not contacts.

Anyway, I'll review the 2 functions to be sure that they aren't being overly intrusive.

_____________________________

Michael

(in reply to Dimitris)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [Logged] Well... I finally finished Bekaa Valley Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.164