Jason_Ryock
Vice Admiral
Getting a general error with WCP Pascal, it seems to happen whenever I try to declare and use any kind of a global variable.
For example, the generic spawn routine that declares and calls several variables doesn't work in my code at all, I get the same error: CFlagList::CFlagIndex No Index Found for CRC (Random String) the Random String always corresponds to the CRC of the Global Variable in the mission file (Checked by compiling and editing, and looking at the result).
Here's the code in question, I copied it straight from the UE6 source code, I'm only going to post the relevent portions to save reading time:
var bugsalive;
function M_Nav1;
begin
Nav_ActivateSelf;
SF_AutopilotDisable;
NAV_SetEjectSequence(ES_SAR_pickup);
AI_Waitseconds(1);
bugsalive:=2;
NAV_Createship(2, 108, 0, @M_Bug, @M_BugCount, 1000, 100, 0);
NAV_Createship(2, 109, 0, @M_Bug, @M_BugCount, 1000, 0, 0);
until (bugsalive=0) do
AI_WaitSeconds(1);
end;
function M_Bug;
begin
SF_SetObjectFlag (OF_Alignment, ALIGN_Alien);
SF_ActivateSelf(0);
while(1) do begin
AI_Waitseconds(1);
end;
end;
function M_BugCount;
begin
bugsalive:=bugsalive- 1;
end;
Tweaking the code, I've come to the conclusion that it has no problem updating the variable to 2 in the nav code, but it doesn't seem to like checking the code to make sure the bugs aren't dead yet.
Removing that line, generates the same error message when a ship is killed, and the mission tries to rewrite the variable again.
Any help? I've been stuck on this for two days. I've even tried running and compiling old mission code I've written that I KNOW works, and anything that uses or declares variables (spawn routines, for example) spits out the same error. I just did a clean install of WCSO this morning, with the only additional files some extra ships (that aren't used in this mission) and the High Res patch.
For example, the generic spawn routine that declares and calls several variables doesn't work in my code at all, I get the same error: CFlagList::CFlagIndex No Index Found for CRC (Random String) the Random String always corresponds to the CRC of the Global Variable in the mission file (Checked by compiling and editing, and looking at the result).
Here's the code in question, I copied it straight from the UE6 source code, I'm only going to post the relevent portions to save reading time:
var bugsalive;
function M_Nav1;
begin
Nav_ActivateSelf;
SF_AutopilotDisable;
NAV_SetEjectSequence(ES_SAR_pickup);
AI_Waitseconds(1);
bugsalive:=2;
NAV_Createship(2, 108, 0, @M_Bug, @M_BugCount, 1000, 100, 0);
NAV_Createship(2, 109, 0, @M_Bug, @M_BugCount, 1000, 0, 0);
until (bugsalive=0) do
AI_WaitSeconds(1);
end;
function M_Bug;
begin
SF_SetObjectFlag (OF_Alignment, ALIGN_Alien);
SF_ActivateSelf(0);
while(1) do begin
AI_Waitseconds(1);
end;
end;
function M_BugCount;
begin
bugsalive:=bugsalive- 1;
end;
Tweaking the code, I've come to the conclusion that it has no problem updating the variable to 2 in the nav code, but it doesn't seem to like checking the code to make sure the bugs aren't dead yet.
Removing that line, generates the same error message when a ship is killed, and the mission tries to rewrite the variable again.
Any help? I've been stuck on this for two days. I've even tried running and compiling old mission code I've written that I KNOW works, and anything that uses or declares variables (spawn routines, for example) spits out the same error. I just did a clean install of WCSO this morning, with the only additional files some extra ships (that aren't used in this mission) and the High Res patch.