New Forums

Please go vote on the new forums now. Let's get this shipped.

You are here

[SOLVED] Compile Error

7 posts / 0 new
Last post
LordValinar
[SOLVED] Compile Error
 
SOLVED: Turns out too many nested includes caused the error. Fixed by "raising the levels" and removing unnecessary includes from some of my custom scripts. Thank you all for your assistance <3



So I'm using a NWNTX (better version for compiling scripts and whatnot) on my computer, and I'm not getting this error, but when compiling these scripts on the other computer (roommate uses default Aurora toolset, no extensions) and she gets:
 
ERROR: INCLUDE TOO MANY LEVELS
 
Now I can't find ANY info on this error, so I have no clue what problem to really look for.
I've gone down the list, each script that has this error when I go to build has my "dscorpse_inc" include, which in 
turns has "ds_inc"  - my primary include for ALL my scripts. dscorpse_inc was for the NPC creature ondeath system... anyways, not as important. Important notes are:
 
* none of my scripts go deep enough, or contain includes to other includes that other includes include.... (say that 10 times fast... lol) 
* The better compiler doesn't get the error while the base toolset does
* Our admin wants 0 compile errors, so I have to figure a way to fix this
* Script that keeps popping up with TOO MANY LEVELS = "x0_i0_equip" (line 16) which is an include for x0_i0_assoc I believe.
  • up
    50%
  • down
    50%
Tarot Redhand

Have you checked this error in the lexicon?

TR

  • up
    50%
  • down
    50%
LordValinar

Sadly yes. I even checked it again just in case. Still nothing there. :(

  • up
    50%
  • down
    50%
Tarot Redhand

Is either x0_i0_equip or x0_i0_assoc a user modified script? Do ds_inc and dscorpse_inc have any includes in them? What I'm wondering here is whether they are both referencing the same file or script.

TR

  • up
    50%
  • down
    50%
LordValinar

No, (..)equip and (..)assoc are default NWN scripts. So... I did a bit of digging. Following the includes all the way to the end, this is the "tech tree" of sorts:

dscorpse_inc -> ds_inc -> dss_core_inc -> dss_spells_inc -> x0_i0_spells -> x0_i0_henchman -> nw_i0_generic -> x0_i0_anims -> x0_i0_walkway -> x0_i0_spawncond -> x0_i0_combat -> x0_i0_talent -> x0_inc_generic -> x0_i0_equip

EDIT: Turns out there's quite a few more functions that I need.. a lot more than I originally thought. Some from switches, generic, nw_i0_spells, a bit here and there.. ugh what a mess. Might be replicating quite a few functions to get what I need :\ 

---
So.... here's what I'm thinking. I only needed like a function or two from x0_i0_spells, so what I'm going to try is just making a Wrapper function of what I need, and NOT include all of that, and see if my problem goes away... it's late, so I might not respond with my test until morning, but I will let you know how it goes.

  • up
    50%
  • down
    50%
Proleric

This problem is mentioned once in the NWN Omnibus.

What is clear is that the Bioware compiler has a limit on the depth to which #include is nested, whereas other compilers don't.

Unfortunately, it doesn't say what the limit is.

One possible cause is an implicit circular reference in the #include chain.

Otherwise, the recommendation is to reduce nesting. For example, if A needs a function from D, better that A should include D, rather than A include B which includes C which includes D - if you follow my drift.

NWN and DAO adventures at http://proleric.com/

  • up
    100%
  • down
    0%
LordValinar

EDIT: Alrighty, all fixed. I broke up some of my includes into the higher level includes, and turns out I didn't even need ds_inc in my dscorpse_inc at all >_> so I just removed that entirely lol I guess it was just habit that I put my main include in all my scripts. So yeah, but all fixed now. Thanks to you both for the suggestions to help me narrow down the problem <3

 

Yeah I get your drift. (just woke up) But I'm going to comment out "x0_i0_spells" from my dss_core_spells include and Build. I should be able to make a list of what functions I require from what include files and be able to deduce which ones I can leave out... hopefully. The problem is I think some of the functions I need are in both A and F, even if D and E aren't necessary which makes that problematic 

  • up
    50%
  • down
    50%