Aller au contenu

Photo

[Solved] Character generation


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

#1
ModWriter

ModWriter
  • Members
  • 55 messages
Ok, i get this script from the wiki: http://social.biowar...cter_generation

#include "events_h"

#include "global_objects_h"



void main()

{

event ev = GetCurrentEvent();

int nEventType = GetEventType(ev); //extract event type from current event

int nEventHandled = FALSE; //keep track of whether the event has been handled

switch(nEventType)

{

case EVENT_TYPE_MODULE_START:

{

PreloadCharGen(); //preloads resources needed for character generation

StartCharGen(GetHero(),0); //initiates character generation

break;

}

}

if (!nEventHandled) //If this event wasn't handled by this script, let the core script try

{

HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);

}

}



with following error:



E: 20:05:30 - testscript.nsc - Unable to get the resource information for "events_h" of type "nsc"



the include-script i can find in a directory, but the program doesn't find it?

Modifié par ModWriter, 29 novembre 2009 - 09:40 .


#2
Nodrak

Nodrak
  • Members
  • 144 messages
Compiles fine on my end, are you sure that error is in relation to this script?  Wait, its looking for events_h.ncs?  You didn't modify events_h did you?

Modifié par Nodrak, 28 novembre 2009 - 10:03 .


#3
Sunjammer

Sunjammer
  • Members
  • 925 messages
I've seen a similar issue but with a slightly different error message. Try opening events_h in the script editor (read only will do) and then switch back to your script and try compiling it again. If it reports the same issue with events_h then it isn't the same issue I have had. However it it then reports the same issue with a different include repeat the process i.e. open the include in question then try compiling your script. Continue until no further errors are reported or you get bored (in which case you can simply open every script in the core package).

#4
Hexenmeister Raven

Hexenmeister Raven
  • Members
  • 55 messages
Sunjammer, isn't that a somehow silly thing to do? I had the same error message with another script during the beta, haven't had a look into the Script-Editor since then (was busy with playing). But I remember that I opened the script several times and this doesn't point me somewhere, the error was still there.

Modifié par Hexenmeister Raven, 28 novembre 2009 - 10:53 .


#5
ModWriter

ModWriter
  • Members
  • 55 messages
It is not especially "events_h", all include-scripts are errors, whatever script i write... and no, nothing changed in core-scripts...

Edit: for example... if i copy paste the include-script, all compile fine... except the include-script in the include-script (ähmmm... now i forgot what i want to say...ahh) and that goes endless... ;)

Hmmm... maybe has something to do with the directory... i don't know...

Modifié par ModWriter, 28 novembre 2009 - 11:47 .


#6
ModWriter

ModWriter
  • Members
  • 55 messages
Ok, solved the prob. My fault. I did it in the client script. Now i write the script normal and it compile well.



By the way, what's the difference between client-scripts and "normal" scripts?

#7
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Client Scripts

#8
Nodrak

Nodrak
  • Members
  • 144 messages
Whoops, wrong thead.  WTB Delete Post option :D

Modifié par Nodrak, 29 novembre 2009 - 06:13 .