Author Topic: Small tables problem  (Read 2597 times)

0 Members and 1 Guest are viewing this topic.

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Small tables problem
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?
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
Re: Small tables problem
Code: [Select]

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?
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Trying to load FS2.exe or FRED2.exe. It got all pissy.

(This is for a modded version of FS2, by the way.)
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Is it a release build? I heard there were some problems with TBL files on a debug build
-C

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
This is without changing the source code. Just tables and miscellaneous stuff changed.
« Last Edit: May 08, 2002, 03:53:29 pm by 223 »
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
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?
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

  

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Just new tables, interface, ships, CB ANIs, briefing icons, everything. The whole load. Campaign I'm working on.
So no source changes.
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
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.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Well, that narrows it down to 100 entries or so
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
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.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Okay, will do :)
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
Quote
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.
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
No luck yet.
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
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.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
Yeah, those are the ones I looked through :) I'll send them to you.
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
If you don't know already, you can send the file(s) to [email protected] :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
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"" )
« Last Edit: May 09, 2002, 12:42:09 am by 657 »
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Hard to believe one extra little " caused so much trouble. :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
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:
-C

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
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. :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers