Old code running?

Moderator: Event DM

Post Reply
User avatar
Tesh
Scholar
Posts: 1421
Joined: Thu Jan 13, 2005 10:58 am
Timezone: GMT +12
Location: Auckland, New Zealand
Contact:

Old code running?

Post by Tesh » Mon May 01, 2006 8:44 pm

Ok, I'm a relative n00b to NWScript but this has got me stumped.

I've got some code that looks at a character and attempts to apply a hide based on the racial type of the PC.

Program Flow is something like this:

onEnterScript -> applyRacialHideScript

Now the code came with some helpful debug statements (w00t!) I just had to switch the debug variable to be TRUE. When I attempted to compile the script the compiler complained that there was no main(), did I want to compile as a conditional scripts, which it couldn't do due to missing a function, so I inserted an empty main() to fool the compiler. This done I started to see the info I needed :)

Now I was getting puzzled by some of the behaviour so I went back and inserted a few more DEBUG statements to see what was going on a bit better. The script compiled sweet as :) However the new DEBUG statements did not show up when I ran the module :|

Anybody got any ideas as to what is going on here? I even tried rebooting my machine to see if it had cached old compiled versions of the scripts :|
Roland of Gilead wrote: I told you we deal in lead, and so we do. But that doesn't make us hired guns.
Belkar wrote: One order of gluttony with a side of coriuption, please.
Bruno Knotslinger
Prince of Bloated Discourse
Posts: 210
Joined: Thu Aug 11, 2005 9:10 pm
Location: Lubbock, TX

Re: Old code running?

Post by Bruno Knotslinger » Mon May 01, 2006 9:46 pm

Tesh wrote:Ok, I'm a relative n00b to NWScript but this has got me stumped.

I've got some code that looks at a character and attempts to apply a hide based on the racial type of the PC.

Program Flow is something like this:

onEnterScript -> applyRacialHideScript

Now the code came with some helpful debug statements (w00t!) I just had to switch the debug variable to be TRUE. When I attempted to compile the script the compiler complained that there was no main(), did I want to compile as a conditional scripts, which it couldn't do due to missing a function, so I inserted an empty main() to fool the compiler. This done I started to see the info I needed :)

Now I was getting puzzled by some of the behaviour so I went back and inserted a few more DEBUG statements to see what was going on a bit better. The script compiled sweet as :) However the new DEBUG statements did not show up when I ran the module :|

Anybody got any ideas as to what is going on here? I even tried rebooting my machine to see if it had cached old compiled versions of the scripts :|
Is this an include by some chance? Includes aren't compiled by themselves. They are compiled when the script that includes them is compiled. As such, changes to includes won't show up until the script that includes it is compiled. (The easiest way to be sure you got all of them is to do a build... just check to compile scripts otherwise you'll be waiting a while for a large mod.)
User avatar
Tesh
Scholar
Posts: 1421
Joined: Thu Jan 13, 2005 10:58 am
Timezone: GMT +12
Location: Auckland, New Zealand
Contact:

Post by Tesh » Mon May 01, 2006 9:53 pm

Ahhhh, yeah, it's an include script.

Thanks heaps, hopfully I'll have some shapechanging Lycanthropes tonight now :D
Roland of Gilead wrote: I told you we deal in lead, and so we do. But that doesn't make us hired guns.
Belkar wrote: One order of gluttony with a side of coriuption, please.
Post Reply