Aller au contenu

Photo

Error compiling custom sys_chargen script (solved)


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
ladydesire

ladydesire
  • Members
  • 1 928 messages
I am encountering the following error while trying to add another class to my current class pack:

E: 17:11:04 - sys_chargen_h.nss - sys_chargen_h.nss(335): Variable defined without type (while compiling prc_2da_constants_h.nss)


The relevant line of sys_chargen_h is as follows:

  else if (nclass == class_MONK)
    {
        _AddAbility(oChar, 100100);
    }


If I comment out the above and compile again, I get an error on line 478:

E: 17:19:55 - sys_chargen_h.nss - sys_chargen_h.nss(478): Case parameter not a constant integer (while compiling prc_2da_constants_h.nss)

And my prc_2da_constants_h does contain the needed reference as follows:

const
int class_MONK = 5;


Everything I have added is copied from code that does work, as the script I am attempting to compile with the new class is in widespread use. I can make the full scripts available if someone wants to see them.

Modifié par ladydesire, 04 juin 2010 - 09:15 .


#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
I am guessing it is either nclass (are you sure it is not nclass?) or oChar that is causing the error in the first case.
Second one, would help if we know what event is being handled. Have you included all the include files required?

Edit: You can still check the nclass thing but I am not so sure now - this buggy forum software converted mine to all lower case (I had C in nclass in upper case)

Modifié par TimelordDC, 04 juin 2010 - 04:17 .


#3
ladydesire

ladydesire
  • Members
  • 1 928 messages

TimelordDC wrote...

I am guessing it is either nclass (are you sure it is not nclass
?) or oChar that is causing the error in the first case.


I don't see how, since I've duplicated a working code segment and only changed the constant.

Have you included all the include files required?


Yes, since I'm using my Tevinter Warden class scripts, which have the includes set up right.

#4
CID-78

CID-78
  • Members
  • 1 124 messages
are you looking in the right script? the error doesn't match the row you posted.



check the same line in the include files, and you should find a switch with a bad case in. or atleast that's what the error suggest.

#5
ladydesire

ladydesire
  • Members
  • 1 928 messages

CID-78 wrote...

are you looking in the right script? the error doesn't match the
row you posted.


My sys_chargen_h script is modified, so the row numbers won't match what you see in your toolset.

check the same line in the include files, and you should find a
switch with a bad case in. or atleast that's what the error
suggest.


*giggles* I have done so at least 4 times and gotten nowhere, since the compiler is making an erroneous claim from what I see. Like I said, I copied working code and made all the right changes and it won't compile.

#6
Phaenan

Phaenan
  • Members
  • 315 messages
Thing is, at times one can't put too much trust in the compiler messages as an error upstream can provoke a fatal error downstream... (rare tho, but nonetheless happened to me a few times)
I can try to look at your code if you want, as I'm not sure I (or anyone for what matters) would be able to help without seeing the big picture.
(no promise tho, I'm good at missing stuff)

Modifié par Phaenan, 04 juin 2010 - 02:12 .


#7
TimelordDC

TimelordDC
  • Members
  • 923 messages
If you can post your code online somewhere or send it via email to me, I can take a look.

#8
ladydesire

ladydesire
  • Members
  • 1 928 messages
Never mind; setting some module resources as part of the Core Game Resources module can do funny things sometimes.

#9
Craig Graff

Craig Graff
  • Members
  • 608 messages
It works like this: Any core resource can only inherit from other core resources.