View Single Post
  #4  
Old 01-04-2013, 07:12 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

almost. you're not concatenating your string correctly in your first example.

you want something like this for the varname field of the qglobal:

Code:
#interpolation
my $aName = $client->AccountName();
my $qGlobal = "SpellReset$aName";
or

Code:
# concatenation
my $qGlobal = "SpellReset" . $client->AccountName();
you don't have to save the varname first. you could do it all in a single line like this:

Code:
quest::setglobal('SpellReset'.$client->AccountName(), 0, 5, 'F');
it's a style choice, really... but you likely want to save it if you intend to use it more than once for the same client in the script.
Reply With Quote