[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Perlscript
. . -> [Subject]  trouble with passing of variables
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

trouble with passing of variables

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Martijn   (20 posts)  [Biography] bio
Date Mon 28 May 2007 11:17 PM (UTC)
below is a crosspost from Scripts. I'm having some real problems with variables under perl, and was wondering if anyone knows what is going on, or may be able to help me find a workaround. I have switched to Python for scriping, but I'm still a little annoyed that what I though should be working, doesn't.

with my limited knowledge of OLE/COM objects I thought activePERL would magicaly poof it and make everything allright. It seems not. Even my targetting system, which was working properly before has gone dodgy now. I have it now as

match="^target (\w+)"

sub setTarget{
my ($theName, $theOutput, $wildcards) = @_;
my $target = GetAliasWildcard($theName, "1");
$world->note("setting target to ".$target);
my $fetchedTarget = $world.getVariable("target");
$world->note("target is now ".$fetchedTarget);

as it is now, imputting

target bigbadwolf

should output

setting target to bigbadwolf
target is now bigbadwolf

wrong. It gives

setting target to bigbadwolf
target is now Win32::OLE=HASH(0xfaa1b4)bigbadwolf

I'm confused now...
[Go to top] top

Posted by KP   (24 posts)  [Biography] bio
Date Reply #1 on Thu 31 May 2007 09:54 PM (UTC)
as usually, its just a small typo:

my $fetchedTarget = $world.getVariable("target");

should be:

my $fetchedTarget = $world->getVariable("target");


[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]