Author Topic: A lil trouble with LETO...  (Read 548 times)

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
A lil trouble with LETO...
« on: July 03, 2011, 05:27:37 am »


               Greetings,
I am having a little trouble with nwn_leto.dll and/or leto_script.dll. I recently integrated a subrace system into my mod, and when I test it locally it works fine, however once uploaded to the server leto seems to be having trouble locating the correct path. On my home pc it is the default path, however on the server it is a custom path. I have entered the correct path in the proper script for the subrace engine, however I can see from the server logs that it is still looking for the server vault in the default location. I tried adding:

const string NWN_DIR = "C:\\custom path\\";
 const string MOD_DIR = "modules/module name";
 const string DB_NAME = "database name";
 const string DB_GATEWAY_VAR = "NWNXLeto";
 const string WP_LIMBO = "";

to the inc_leto script, but still no luck. I also tried adding the correct path in the leto.ini, but nadda. Any help would be appreciated.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
A lil trouble with LETO...
« Reply #1 on: July 03, 2011, 05:36:01 am »


               Make sure you recompile all scripts using the include after editing the path. That was a VERY common mistake made with HGLL and DAR II setups I helped troubleshoot.

Funky
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
A lil trouble with LETO...
« Reply #2 on: July 03, 2011, 05:38:45 am »


               Thanks Funky, what do you mean using the include though?

Edit, nvm mind, I got ya I think...  I just did a full build/compile on scripts, hopefully that should do it.
               
               

               


                     Modifié par Lazarus Magni, 03 juillet 2011 - 04:41 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
A lil trouble with LETO...
« Reply #3 on: July 03, 2011, 05:45:41 am »


               Ok. There are two kinds of scripts. Those with void main, and those without. Some esoteric exceptions aside, those without void main are generally known as includes. They hold scripts that are used by other scripts, ones that do have a main function that executes.

Void main() scripts will 'include' these reference, or include scripts (or header files, in C), by means of an include statement at the top (or 'head') of the script. It looks like this:

#include "<script name here>"

By way of example, if your script is called inc_leto, scripts including it would have this in them, generally at or near the top:
#include "inc_leto"

The simplest way to compile them all using the nwn toolset is to do a module build, unchecking EVERYTHING but scripts (the build is generally useless, given the amount of time it takes, for things other than scripts).

If you get errors when compiling, that means that the script did NOT compile, and that the old compiled version will be used instead, if there is one (there won't be if it's a script you just wrote). You'll need to resolve those errors before your scripts will run according to the scripts you've edited in the toolset.

Funky
               
               

               


                     Modifié par FunkySwerve, 03 juillet 2011 - 04:47 .
                     
                  


            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
A lil trouble with LETO...
« Reply #4 on: July 03, 2011, 06:09:07 am »


               I gotchya, thank you FunkySwerve. Yeah the module I am working with has I am guessing between 500 and 1000 custom scripts over 8 + years of development, and numerous developers. When I do a full build (script) complie, sadly a list of prolly 20 or 30 come up as did not compile. The ones I have been working on generally do compile, and when they don't I can find the error, except for one's with errors like:
ERROR: NO FUNCTION MAIN() IN SCRIPT

Regardless, in this instance as I said everything was working fine locally, so I have reverted back to how I had it set up locally (before I tried adding that other stuff mentioned above), with the exception of having the server's file path instead of the default. I then did a full build on the scripts, and uploading presently. Hopefully that should do it, this has been driving me crazy all day. Thanks again Funky.
Laz
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
A lil trouble with LETO...
« Reply #5 on: July 03, 2011, 08:41:10 am »


               Goodness gracious Funky you are the man (or woman, or whatever.) Thank you so much!