Problem encountered when several mobs are polling a global...
Here is the error text I get when the server is run.
Quote:
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}); $qglobals{FightClubFreeportController} is defined, well before any of the accessing NPCs spawn, as... Code:
quest::setglobal( "FightClubFreeportController", 1, 7, "F" ); I can drop the related scripts if requested. |
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?
|
Globals are enabled for the other mobs.
The quotes are just from the output; they are not in the file. |
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. |
I don't see anything wrong with the 2 lines you posted. Possibly somewhere else in the script.
|
@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} ) |
Do your NPCs have the same NPCID across zones?
|
They do not share the same NPCID, that's something I was planning to try.
I'll give it a shot. |
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.
|
@joligario
Funny I tried the scripts with all the NPCs sharing the same NPCID and the problem is still the same. |
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. |
All times are GMT -4. The time now is 07:36 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.