Author Topic: autocache problems  (Read 376 times)

Legacy_Alassirana

  • Full Member
  • ***
  • Posts: 103
  • Karma: +0/-0
autocache problems
« on: July 24, 2011, 12:30:51 am »


               I've been having an annoying problem.  I've been attempting to bug-fix something from Shayan's Subrace Engine (for some reason, some of its commands aren't quite right, and I'm trying to test a fix), but every time I build, and save under a new name, the script reads properly in the toolset, but nwnx' odbc log is showing that the server is calling the old function.  Is there a way to clear the autocache so that it reads the new script?
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
autocache problems
« Reply #1 on: July 24, 2011, 02:35:55 am »


               There is no 'autocache' that does what you're describing - script ARE cached automatically while the server is running, but this is not your problem. You need to recompile all the scripts involved succesfully, with no errors, in order for the new script to replace the old compiled version.

Funky
               
               

               
            

Legacy_Melkior_King

  • Full Member
  • ***
  • Posts: 234
  • Karma: +0/-0
autocache problems
« Reply #2 on: July 24, 2011, 05:39:32 am »


               Build - Build Module
Unselect "Unused" and "Missing Resources"
Under "Compile", unselect all except for "Scripts"
Click "Build" and wait.  If there are no errors at the end, you're good to go.
This ensures that any altered "include" files are recompiled and that the new versions are used in scripts.

I've gotten into the habit of doing this any time I change a script, even if it's not an included file.
               
               

               
            

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
autocache problems
« Reply #3 on: July 24, 2011, 08:11:51 am »


               you must also change all the references if you rename something.
               
               

               
            

Legacy_Alassirana

  • Full Member
  • ***
  • Posts: 103
  • Karma: +0/-0
autocache problems
« Reply #4 on: July 24, 2011, 12:22:24 pm »


               My problem seems to be that it's an 'include' script that is needing to be fixed, and since they don't compile (and apparently anything using them doesn't compile properly anyhow), I can't get it to reset properly.
I'm playing around with Shayan's Subraces, but I can't seem to make it work properly.  I'm almost ready to give up on subraces altogether after as much frustration as I've had with this thing.  I've been using the 'build' option constantly, but can't figure out why these things aren't working (outside of one tiny script, but that seems to be because the crp has a script called that they don't supply, which is annoying).
               
               

               
            

Legacy_Alassirana

  • Full Member
  • ***
  • Posts: 103
  • Karma: +0/-0
autocache problems
« Reply #5 on: July 24, 2011, 02:55:38 pm »


               Ok, took all of the shayan's scripts/items out, then made sure everything built, then added them again, and for some reason, everything compiled properly..and is working.  Thanks for the help, everyone.
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
autocache problems
« Reply #6 on: July 24, 2011, 02:57:51 pm »


               If you edit an include, every script that references the functions you edited from that include needs to be recompiled. Basically, when you use functions from an include they are inserted directly into your script on compile, making them effectively a separate copy of the included function. Try building again. If it doesn't fix your problem, then chances are either your code doesn't do what it ought to, or you've made syntax errors that prevent it from compiling any of the scripts it's linked to from.

I tend to use a roundabout method when editing stuff in includes I'm unsure of, of copying and pasting the function I'm working on into another script, and compiling that. Makes it much more convenient for finding compiler errors. Then I paste over the edited function into the include, and re-build the module.

Edit: Darn you and your impeccable timing ':wizard:'
               
               

               


                     Modifié par _six, 24 juillet 2011 - 01:59 .