Log in

View Full Version : Log - Use of uninitialized value...


eqwarrior
08-02-2009, 09:26 PM
I edited most of my quest to do globals the right way, and now I'm getting a new error, just wondering how I can fix it.


Use of uninitialized value $qst2700245::qglobals{"qviclevel"} in numeric eq (==) at quests/qrg/Custom_Zones.pl line 139.

if ($qglobals{qviclevel} == 15 && $ulevel == 70) {

Also I redid one of turn in quest, and getting another error:

Use of uninitialized value $qst2700248::itemcount{"99711"} in numeric eq (==) at quests/qrg/Epic_Vendor.pl line 229.

if ($itemcount{99711} == 1) {

And I know there are multiple ways of doing item turn ins, but this seemed like the easier and shortest way to do, since I have over 100 possible turn in with elsif with a final else return items.

Any insight how to fix the errors from showing up would be appreciated.

joligario
08-02-2009, 10:03 PM
The first one is most likely telling you it is not defined. Before $qglobals, check if defined before checking value.
if (defined($qglobals{qviclevel}) && $qglobals{qviclevel} == 15 && $ulevel == 70) {

For the second one, it is better to use the plugin.
if (plugin::check_handin(\%itemcount, 99711 => 1)) {

thepoetwarrior
08-03-2009, 05:24 AM
Thanks much !!!