Hey everyone,
I meant SDK 2.1. Not sure what I was thinking when typing 3.1.
Hooman, thank you for the tips on reducing the boiler plate code. I went ahead and made the suggested changes and recompiled the solution. I checked it by loading it into Outpost 2, saving the scenario, and then loading the save, just in case something changed. It still crashes when going to the mission objectives tab. I put the exception and stack trace at the bottom of this post.
I'm using Microsoft Visual Studio 2015 and the built in compiler. I didn't change any project or solution level settings from the SDK 2.1 example project Except:
- Changed the Project Target Name to cTest (Under Project -> OP2Script Properties -> General)
- Changed the Output File to .\Release\cTest.dll (Under Project -> OP2Script -> Linker)
Attached to this post is the Compiled DLL throwing the error. Also attached is a ZIP file containing the full Visual Studio Solution that was used to compile the code.
Except the ZIP file is missing the file OP2Script.sdf so it is small enough to attach to the forum post. If the SDF file is important, let me know and we can work something out through an email or something else to transfer it. I think SDF is a Sequel Server Compact Database file, but not sure what its purpose is in the SDK.
Is there anything preventing us from making the following updates to the sample project included in the SDK?
- Remove the function StatusProc
- Using the function ExportLevelDetails to set scenario properties instead of the separate variables
- Remove the GetSaveRegions and make a comment to use ExportSaveLoadData if data persistence is required for the scenario
- Remove #include <windows.h> and the function DllMain
Exception: Unhandled exception at 0x004C68A2 in Outpost2.exe: 0xC0000005: Access violation reading location 0x10963254.
Stack Trace> Outpost2.exe!004c68a2() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for Outpost2.exe]
Outpost2.exe!0040a605() Unknown
Outpost2.exe!004317de() Unknown
[External Code]
Outpost2.exe!00430d83() Unknown
Outpost2.exe!00430e7f() Unknown
Outpost2.exe!00465494() Unknown
Outpost2.exe!004653ca() Unknown
[External Code]
Outpost2.exe!00431206() Unknown
Outpost2.exe!0040a99d() Unknown
Outpost2.exe!0049d244() Unknown
Outpost2.exe!0045d1de() Unknown
Outpost2.exe!0045d1f7() Unknown
Outpost2.exe!0045c5c3() Unknown
Outpost2.exe!0040acfe() Unknown
[External Code]
Outpost2.exe!00499f46() Unknown
[External Code]
Outpost2.exe!0040a605() Unknown
Outpost2.exe!004317de() Unknown
Outpost2.exe!0045c98d() Unknown
Outpost2.exe!00431303() Unknown
[External Code]
Outpost2.exe!004866b7() Unknown
Outpost2.exe!004a88a0() Unknown
Outpost2.exe!004c425b() Unknown
[External Code]