Aller au contenu

Photo

GetEvent... returns 0


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

#1
edmogt1

edmogt1
  • Members
  • 52 messages
There's a spell script I made and I'm calling DelayEvent inside of it.  My problem is that when the event is fired, the event variables I set using SetEvent... come back 0/null with GetEvent.... 
Image IPBImage IPB

#2
FergusM

FergusM
  • Members
  • 460 messages
Without seeing the code I'm not sure, but my guess is you're doing this:

event ev = Event(whatever);
SetEventInteger(ev,0,SOMEINT);
DelayEvent(1.0,OBJECT,ev);

what you need to do is set ev to the return value of the SetEvent function. e.g.

event ev = Event(whatever);
ev = SetEventInteger(ev,0,SOMEINT);
DelayEvent(1.0,OBJECT,ev);

Just a guess, if that's not the case post a little of your code so we can get an idea what is going wrong.

Modifié par FergusM, 27 juillet 2010 - 02:03 .


#3
edmogt1

edmogt1
  • Members
  • 52 messages
Yeah that was it. Thank you :)

#4
Talisander

Talisander
  • Members
  • 173 messages
Wow, you're good, Fergus :-D

#5
FergusM

FergusM
  • Members
  • 460 messages
I made the same mistake myself about a month ago. :P

#6
Sunjammer

Sunjammer
  • Members
  • 926 messages
I having the strongest deja vu!