Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2009, 11:12 AM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Not sure why it's hard to follow...but maybe this will help...

When I use #reloadqst my quest globals become undefined.
Reply With Quote
  #2  
Old 06-03-2009, 11:35 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

We want that to happen, so the script reloads the values from the database. I too don't understand what the trouble is.
Reply With Quote
  #3  
Old 06-03-2009, 12:21 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by cavedude View Post
We want that to happen, so the script reloads the values from the database. I too don't understand what the trouble is.
I'm basically doing the Imildu's Tasks from the Abysmal Sea. It's a tradeskill task and part of the task is to basically make things and then give the results back to the the quest giver. For each step you have to hand in 100 items. I track the number of items handed in via a quest global. As I'm testing and modifying the script I have to #reloadqst from time to time as I change it. When I do this, the value in the database is correct for the last item I handed in. So when I do a #reloadqst my quest global becomes undefined and starts over, resetting it in the database. I expected it just to re-read it from the database and start from where that was, but it doesn't. It starts over. Since I'm checking like this:

Code:
if (!defined($qglobals{imildustep1})) {
    quest::setglobal("imildustep1",0,0,F);
}
Then when I update the value...

Code:
if(plugin::check_handin(\%itemcount, #### => 1)) {
    $val = $qglobal{imildustep1} + 1;
    $qglobal{imildustep1} += 1;
    quest::setglobal("imildustep1",$val,0,F);
}
I'm watching the value in the database increase as it should...

This works fine until I hit #reloadqst, then instead of getting the current value in the database, I get it starting over and the value in the database get sets set to 0.
Reply With Quote
  #4  
Old 06-03-2009, 12:44 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

The first bit is your problem... quest::setglobal("imildustep1",0,0,F); is setting the global value in the DB to 0.
Reply With Quote
  #5  
Old 06-03-2009, 12:47 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

I understand that. However, once it's set in the DB, it shouldn't be undefined.

Code:
if (!defined($qglobals{imildustep1})) {
    quest::setglobal("imildustep1",0,0,F);
}
Shouldn't the value of that be defined since it's being read from the database on #reloadqst? Maybe I don't understand how this all works as well as I thought I did.
Reply With Quote
  #6  
Old 06-03-2009, 01:14 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I see what you mean now. I don't believe I've ever run into that before. The only thing I can think of, try putting an if statement before that checking for the global's value and have it do nothing. Perhaps if you force the script the read the global it'll realize it is defined.
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:39 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3