Issue information

Issue ID
#2445
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Nov 15, 2008 22:32
Last Post
Hercules Elf Bot
Nov 15, 2008 22:32
Confirmation
N/A

Hercules Elf Bot - Nov 15, 2008 22:32

Originally posted by [b]Terces[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2445

CODE
prontera.gat,145,180,4    script    Testo    123,{

OnInit:

    debugmes "Setting first value";

    set .test,123;

}



prontera.gat,145,182,4    script    Testlol    123,{

OnInit:

    sleep 1;

    debugmes "Value: "+getvariableofnpc(.test,"Testo");

}


Without the sleep in the second NPC, it would always print out 0 as a value. With the sleep however it prints out 123.
The order the NPCs are loaded does not matter at all.

I think the OnInit Events should happen chronological and not random, cause then you never know if variables are available already or not...