Author Topic: Any way to force a script to compile? Working script does not compile even untouched.  (Read 401 times)

Legacy_Lich Larloch

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0


               I'm trying to modify someones script but the thing won't compile. Even if I just open it and try to recompile it doesn't work. How did the person get it to compile and work in game in the first place?

Thanks guys.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               The person who write it could have different includes or brand new included that she didnt send with the script.

Or this person made the script, compiled it but then willingly made a syntax error in order this script couldn't be compiled by anyone else.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0


               Well the script did compile.  If the script never did compile then it would have never created a .ncs file.    So either:

1.  Someone has changed the script since it compiled correctly

2.  they used a different compiler to compile it.  

3.  Some one has changed one of the include files that the script uses.  

4.  you have added a hak that has changed include files that the script uses.  

5.  they added new functions/ constants to nwscript that are no longer there.  

6 they had all of there includes in a hak or the override folder and you you not have them.  

7 the list goes on and on....

without you posting the script and/and or error there is really not enough information to tell you what is going on.
               
               

               
            

Legacy_Lich Larloch

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0


               Thanks for replying guys. This is the error:

ERROR: FUNCTION IMPLEMENTATION AND DEFINTITION DIFFER

This is the line the error points to and it is in a different script. I guess the scripts are tied together.

void SetDescription(object oQuestNPC,string sText);
               
               

               


                     Modifié par Lich Larloch, 08 novembre 2011 - 09:30 .
                     
                  


            

Legacy_OldMansBeard

  • Full Member
  • ***
  • Posts: 245
  • Karma: +0/-0


               SetDescription() is a built-in scripting function, so you can't redefine it. That's why it won't compile. But it has only been built-in since patch 1.69. Before that, it wasn't built-in so it could be redefined and the script would have compiled. It's an old script that used to work but wasn't forward compatible with 1.69

Rub out the declaration and implementation of that function, and it should work.
               
               

               
            

Legacy_Lich Larloch

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0


               Thanks a lot OldMansBeard I will give it a try.