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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-08-2012, 01:13 AM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default failure passing var to spawn2 or PEBCAK?

PLEASE let the answer be PEBCAK.

Ok so I have a script that spawn an npc based on a variable for the spawn ID

This causes a zone.exe crash everytime

When tested, @row[0] = 2700972
that value is the npc_id for that particular case, that I want to spawn..

Without posting all of my plugins and such... lets pretend that

(It does some work and produces a @ array, after searching the DB for some parameters using a db plugin)

This crashes zone.exe
Code:
my $var_to_test = @row[0]
quest::spawn2($var_to_test,0,0,$x,$y,$z,$h);
This also crashes zone.exe
Code:
quest::spawn2(@row[0],0,0,$x,$y,$z,$h);
HOWEVER
this does NOT crash zone.exe, and it works and spawns the npc - but is useless to me because i am hardcoding it in that case.
Code:
my $var_to_test = 2700972;
quest::spawn2($var_to_test,0,0,$x,$y,$z,$h);
WTF is perl doing when I transfer it from @ to $??????? I did some searches and couldnt figure it out

i tried
my ($var_to_test) = @row;
which supposedly takes the first value from row, but that didn't work - even though another variable test showed the right number again.

i also tried casting $var_to_test with int($var_to_test)

I saw something about "blessing" a variable.. is this something i need to do? (i couldn't understand what blessing meant)
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
 


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 02:42 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