I am trying to define my global Variables in mushclient to Local Variables within my sub routine and cannot for the life of figure it out.
Have I mentioned I am new to Mushclient? *hangs his head in shame after 32 years of never learning simple coding"
This is what I have and please someone point out what I am doing wrong.
sub testsub {
my $a = $world->GetVariable("test1");
my $b = $world->GetVariable("test2");
my $c = $world->GetVariable("test3");
if ([$a] == 1)
{
SetVariable([$a], 0)
}
if ([$b] == 2)
{
SetVariable([$b], 0)
}
if ([$c] == 3)
{
SetVariable([$c], 0)
}
}
Have I mentioned I am new to Mushclient? *hangs his head in shame after 32 years of never learning simple coding"
This is what I have and please someone point out what I am doing wrong.
sub testsub {
my $a = $world->GetVariable("test1");
my $b = $world->GetVariable("test2");
my $c = $world->GetVariable("test3");
if ([$a] == 1)
{
SetVariable([$a], 0)
}
if ([$b] == 2)
{
SetVariable([$b], 0)
}
if ([$c] == 3)
{
SetVariable([$c], 0)
}
}