Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2011, 02:28 AM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default Problem encountered when several mobs are polling a global...

Here is the error text I get when the server is run.

Quote:
[Quest] Use of uninitialized value $qst999175::qglobals{"FightClubFreeportController" } in int at quests/freporte/LocalController.pl line 46.
Three NPCs from three different zones are polling qglobals{"FightClubFreeportController"} every 5 seconds.
One NPC reads the value fine; the other two don't.

They all run the same script, and here is line 46...
Code:
$controller = int($qglobals{FightClubFreeportController});
From what I can gather, whichever NPC spawns first somehow takes control of $qglobals{FightClubFreeportController}.

$qglobals{FightClubFreeportController} is defined, well before any of the accessing NPCs spawn, as...
Code:
quest::setglobal( "FightClubFreeportController", 1, 7, "F" );
Any thoughts are welcome.
I can drop the related scripts if requested.
Reply With Quote
  #2  
Old 08-12-2011, 05:09 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

I don't think any NPC gains a lock on the global. The other two NPCs have quest globals enabled? Are you using the quotes in the other files or did your output just show that?
Reply With Quote
  #3  
Old 08-12-2011, 05:41 AM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default

Globals are enabled for the other mobs.
The quotes are just from the output; they are not in the file.
Reply With Quote
  #4  
Old 08-12-2011, 08:29 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

To see the globals that apply to a particular NPC you can target them and type #globalview

You can also look in the quest_globals table in your database to see them all. Anything that has charid, npcid, and zoneid all set to 0 should be accessible from anywhere. These are based on the flags you passed in when you created it.
Reply With Quote
  #5  
Old 08-12-2011, 08:36 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

I don't see anything wrong with the 2 lines you posted. Possibly somewhere else in the script.
Reply With Quote
  #6  
Old 08-13-2011, 11:01 AM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default

@lerxst2112
I checked the quest_globals table and did find a couple weirdly set variables, likely from the first run of the script, so I deleted all the entries and booted the server again.
All quest_global entries now read 0 for npcid, zoneid and charid.
I no longer am getting the error, but still the problem persists.
Of the three mobs trying to read the variable, only one can.
The others don't actually see the variable as defined.
Code:
if( defined $qglobals{FightClubFreeportController} )
  ...
Works for the NPC in the zone that starts first, the zones afterwards see the variable as nonexistent.
Reply With Quote
  #7  
Old 08-13-2011, 12:41 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Do your NPCs have the same NPCID across zones?
Reply With Quote
  #8  
Old 08-13-2011, 10:24 PM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default

They do not share the same NPCID, that's something I was planning to try.
I'll give it a shot.
Reply With Quote
  #9  
Old 08-13-2011, 11:04 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Hehe. Actually, I was going to say that we've been running into cross-zone script problems when you use the same npc in the database for multiple zones.
Reply With Quote
  #10  
Old 08-14-2011, 11:23 AM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default

@joligario
Funny

I tried the scripts with all the NPCs sharing the same NPCID and the problem is still the same.
Reply With Quote
  #11  
Old 08-15-2011, 06:03 PM
Ignorance
Fire Beetle
 
Join Date: Jun 2006
Location: baconland
Posts: 14
Default

Problem resolved.

I ended up having to make a variable for each mob.
Whats odd is that only one variable was effected.
I have others that are accessed in a similar manner, but have no issues.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:51 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3