Aller au contenu

Photo

Got something strange with events


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

#1
anakin5

anakin5
  • Members
  • 258 messages
This one is simple, I have the function :


void main()
{
    event custom_ev = Event(EVENT_TYPE_DAMAGED);
   
    if (IsEventValid(custom_ev) != TRUE)
        DisplayFloatyMessage(OBJECT_SELF, "invalid event");

    SetEventInteger(custom_ev, 0, 10);

    DisplayFloatyMessage(OBJECT_SELF, IntToString(GetEventInteger(custom_ev, 0)));
}


It displays 0 ...

Modifié par anakin5, 05 février 2010 - 03:08 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
custom_ev = SetEventInteger(custom_ev, 0, 10);

#3
anakin5

anakin5
  • Members
  • 258 messages
aaaaaaaaaaaaaaaah, thank you so much :)

Modifié par anakin5, 05 février 2010 - 06:27 .


#4
Magic

Magic
  • Members
  • 187 messages
For those who might be interested, arrays are passed by reference.

Should be obvious I guess, but not all obvious things are true. :happy:

#5
fluffyamoeba

fluffyamoeba
  • Members
  • 264 messages
http://social.biowar...overview#Arrays