Furniture
10-25-2013, 03:01 PM
I'm not sure what I'm doing wrong. For some reason I am having trouble getting my qglobals properly read. I've done it fine in the past so this is bewildering to me.
Heres an example:
sub EVENT_SPAWN
{
quest::settimer("boatcheck", 5);
}
sub EVENT_TIMER
{
if(!defined $qglobals{bbtest4})
{
if($timer eq "boatcheck") {
quest::shout("TEST");
quest::setglobal("bbtest4", 1, 7, "F");
}
}
}
Running this script, an npc repeadetly shouts every 5 seconds, yet there is definitely the bbtest4 global variable entered into my databse so it seems the if(!defined $qglobals{bbtest4}) if where the problem lies.
From what I understand, this code should just result in the npc shouting after the first 5 seconds and then stop. Can anyone recognize what i'm doing wrong?
Heres an example:
sub EVENT_SPAWN
{
quest::settimer("boatcheck", 5);
}
sub EVENT_TIMER
{
if(!defined $qglobals{bbtest4})
{
if($timer eq "boatcheck") {
quest::shout("TEST");
quest::setglobal("bbtest4", 1, 7, "F");
}
}
}
Running this script, an npc repeadetly shouts every 5 seconds, yet there is definitely the bbtest4 global variable entered into my databse so it seems the if(!defined $qglobals{bbtest4}) if where the problem lies.
From what I understand, this code should just result in the npc shouting after the first 5 seconds and then stop. Can anyone recognize what i'm doing wrong?