Jump to content

Create Header files to avoid recursive dependancies


Recommended Posts

So you want to use ModA, but it requires ModB, which requires ....., You don't need to track down the full chain of mods. The compiler only needs the function declarations you are using.  Create a "header" file with empty functions for the ones you need.

If ModA.psc looks like:

Scriptname ModA extends Quest

Imports JConatainer
int actors

Function OnInit()
  actors = JMap.values()
EndFunction

Actor Function getActor(int id)
    return JValue.getForm(actors, id)
EndFunction 

 

Your simple header ModA.psc file should look like this:

Scriptname ModA extends Quest

Actor Function getActor(int id)
EndFunction 

 

Edited by Good0Provider
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...