EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Quests (https://www.eqemulator.org/forums/forumdisplay.php?f=624)
-   -   quest::targlobal problem (https://www.eqemulator.org/forums/showthread.php?t=13828)

Charmy 05-17-2004 11:28 AM

quest::targlobal problem
 
Hi all trying to get this funtion to work, here is the code i am using

Code:

sub EVENT_ITEM
{
checkitem ( )
}

sub CheckItem
{
 if($itemcount{18700} && $itemcount{18700} == 1) #Finsihed Class Combined Bag
{
quest::targlobal("NecroCMP","2","D5",$mobid,$charid,$zoneln);
quest::emote("Opens the bag and peers inside");
quest::say("Hmm looks like everthing is here, well i suppose your good enough to study the art of necromancy. Just tell me when you are [Ready] and I shall being your lessons");
}
}
...

NOTE: i left alot out of the quest its several hundred lines long so i am only posting the part that doesn't work.

Code:

if($NecroCMP == "2")
{
quest::say("So Be it.");
quest::delglobal("NecroCMP");
#<events happen here>
}
else
{
quest::say("How dare you ask to begin studying with me before you have completed my quest.");
}
}
...

My problem is this, when i hand in the item i get the text like i have finished but then i say "ready" and it goes to the else action, i get an error in zone.exe

Code:

error inserting necroCMP:DBcore::RunQuery: No Result
this i beleive is telling me its having a problem posting the value of "2" into the database, however i don't understand why. if you have any ideas on a fix for this, that would be great thanks in advanced.

KhaN 05-17-2004 11:29 AM

I will add that, when we open DB, variable is created and value 2 is inserted.

*cry*

Charmy 05-17-2004 11:30 AM

yak* didn't know this. bad error =(

Scorpious2k 05-17-2004 11:38 AM

Quote:

quest::targlobal("NecroCMP","2","D5",$mobid,$chari d,$zoneln);
$zoneln?

don't you want the zone id number and not the long name here?

KhaN 05-17-2004 11:52 AM

changed "zoneln" by "zoneid", now in DB, it return the zone ID.
But charid is at 0.

Charmy 05-17-2004 12:05 PM

Yes i did mean the id, however i don't beleive it works yet =( but thanks for pointing that out, i am sure it would have been an issue later on.

KhaN 05-18-2004 02:06 AM

All rows in tables are setup correctly, but variables still not working ... *cry*

Scorpious2k 05-18-2004 04:48 AM

On the DB...

Is npcid correct? You said that charid=0... that's wrong, but shouldn't interfere (its still a problem)

and I have to ask... in npc_types, is qglobal=1 for the npc to receive the targlobal variable? and remember the server has to be restarted if you change qglobal (or anything else in npc_type) for it to work.

Charmy 05-18-2004 06:04 AM

Hmm.. we will try this today, i didn't realize the npc_types table was defaulted to 0 for qglobal, Thanks for the info S2k=) going to go try it =).

KhaN 05-18-2004 07:00 AM

Thanks Scorp for your help, it work :)
We changed $userid by $charid and changed qglobal to 1 (*doh*).
For informations, error XXX still show on zone box, but it work fine (Using 5.7DR3 15.05.04).


All times are GMT -4. The time now is 06:17 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.