Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Alikchi on May 04, 2002, 03:36:55 pm
-
Error: Unknown lookup_type in stuff_int_list
File:C:\projects\freespace2\code\Parse\PARSELO.CPP
Line: 1420
Call stack:
------------------------------------------------------------------
------------------------------------------------------------------
That's what I get. Help?
-
int stuff_int_list(int *ilp, int max_ints, int lookup_type)
{
int count = 0, ok_flag = 1, dummy;
ignore_white_space();
if (*Mp != '(') {
error_display(1, "Reading integer list. Found [%c]. Expecting '('.\n", *Mp);
longjmp(parse_abort, 6);
}
Mp++;
ignore_white_space();
while (*Mp != ')') {
Assert(count < max_ints);
if (*Mp == '"') {
int num = 0;
char str[128];
get_string(str);
switch (lookup_type) {
case SHIP_TYPE:
num = ship_name_lookup(str); // returns index of Ship[] entry with name
break;
case SHIP_INFO_TYPE:
ok_flag = 1;
num = ship_info_lookup(str); // returns index of Ship_info[] entry with name
if (num < 0)
ok_flag = 0;
break;
case WEAPON_POOL_TYPE:
ok_flag = 1;
num = weapon_info_lookup(str);
if (num < 0)
ok_flag = 0;
break;
case WEAPON_LIST_TYPE:
num = weapon_info_lookup(str);
if (num < 0)
num = -2;
break;
case RAW_INTEGER_TYPE:
num = atoi(str);
break;
default:
Error(LOCATION,"Unknown lookup_type in stuff_int_list");
break;
}
if (ok_flag) {
if (num == -1) {
Error(LOCATION, "Unable to find string \"%s\" in stuff_int_list\n\nMany possible sources for this error. Get a programmer!\n", str);
} else if (num == -2) {
if (strlen(str) > 0) {
Warning(LOCATION, "Unable to find WEAPON_LIST_TYPE string \"%s\" in stuff_int_list\n\nMany possible sources for this error. Get a programmer!\n", str);
}
}
if (num < 0) // other negatives used to bypass the above error trap, but should be -1
num = -1;
ilp[count++] = num;
}
} else {
if (ok_flag)
stuff_int(&ilp[count++]);
else
stuff_int(&dummy);
}
ignore_white_space();
}
Mp++;
return count;
}
Line 1420 reads
default:
Error(LOCATION,"Unknown lookup_type in stuff_int_list");
break;
Anyways, what were you doing at the time of the error?
-
Trying to load FS2.exe or FRED2.exe. It got all pissy.
(This is for a modded version of FS2, by the way.)
-
Is it a release build? I heard there were some problems with TBL files on a debug build
-
This is without changing the source code. Just tables and miscellaneous stuff changed.
-
You said this is for a "modded" version. What exactly do you mean? Is it a version you modified by using the source and compiled or did you download and install one of these FS2 mods like the Robotech MOD, BWO, etc.? In otherwords, what's different about it from a regular version installed from the CDs?
-
Just new tables, interface, ships, CB ANIs, briefing icons, everything. The whole load. Campaign I'm working on.
So no source changes.
-
Originally posted by Alikchi
Just new tables, interface, ships, CB ANIs, briefing icons, everything. The whole load. Campaign I'm working on.
So no source changes.
Something in your tables is what's screwing it up I think. Most likely a ship or weapon without a type. (All ships should have something like "fighter" "bomber" "capital" etc. on the $flags line in their ships.tbl entry.) I believe that error occurs when it's reading the ships.tbl and weapons.tbl table files and finds an entry where it can't figure out what it's supposed to be.
-
Well, that narrows it down to 100 entries or so
-
Did you make 100 entries yourself?? If not, look at the ones you've made yourself and if there isn't anything wrong there look at any you've edited but didn't make. Searching for $flag in the ships table could help speed things a long.
-
Okay, will do :)
-
Originally posted by WMCoolmon
Is it a release build? I heard there were some problems with TBL files on a debug build
I was having weapons table problems when I tried to compile it in debug mode. It compiled, but FS2 refused to run, reporting something about "bogus" weapon table flags.
-
No luck yet.
-
If you could put your table files up for download somewhere (or send them to me) I could take a look through and see if anything looks wrong. The ship and weapon tables are the most likely culprits.
-
Yeah, those are the ones I looked through :) I'll send them to you.
-
If you don't know already, you can send the file(s) to [email protected] :)
-
It took a long time, but I finally figured out what was wrong with your ship table file. And then I figured out I was wrong and found the real culprit in the Aten section:
$Subsystem: turret06,0.833,1.0
$Default PBanks: ( "Vasudan Turret"" )
-
Hard to believe one extra little " caused so much trouble. :)
-
Originally posted by EdrickV
Hard to believe one extra little " caused so much trouble. :)
Yeah...only programming is so bad. One small typo or mistake (adding two ' instead of one " anyone?) and you get hours of debugging fun. :doubt:
-
Originally posted by WMCoolmon
Yeah...only programming is so bad. One small typo or mistake (adding two ' instead of one " anyone?) and you get hours of debugging fun. :doubt:
Don't forget the missing ;'s that cause 20 different error messages. :) I actually haven't used debuggers much, a lot of that info doesn't mean anything to me as I don't know assembly. Variable watches can be useful though.
Edit: Or rather I don't know Intel assembly and have probably forgotten most of my knowledge of 6502B/65C816 assembly. :)
-
Doh!
Someone needs to make a problem that can fix things like this.
More detailed error messages would be a nice addition to the source code..
Well, it works now. Thanks dude :)