|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Mon Jan 12, 2009 4:48 am
simple variable expansion issues |
this one is probably really simple but i cant figure it out.
Code: |
#button @character_name @character_name {@character_name+login} |
the button name and id expand properly but the command comes out as @character_name+login not player+login.
it's also occuring when i'm trying to create an alias...
Code: |
#alias @character_name+login {#class @character_name 0} |
neither variables expand either.
i've used %concat and %expand to expand the #alias name successfully but they dont work inside the {}... i'm missing something fundamental here.
jack |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon Jan 12, 2009 5:36 am |
Buttons are best made in the gui for this very reason.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Mon Jan 12, 2009 10:35 am |
Would this help?
#alias @character_name+login {#var Exec_charname "~#class ~@character_name 0";#exec @Exec_charname} |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon Jan 12, 2009 10:44 am |
for the alias
#ALIAS %concat(@charecter_name, "+logiin") {dostuff} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Mon Jan 12, 2009 10:21 pm |
nods shalimar, that was my work around, but it's the variables inside the {dostuff} string that are giving me problems.
scirkhan, i see what you're aiming at but i cant get it to work yet, the {dostuff} still comes out #class @character_name 0 instead of #class player 0. i'll keep plugging. |
|
|
|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Mon Jan 12, 2009 10:31 pm |
sweet got it working
Code: |
#alias %concat( @character_name, "+login") {
#var Exec_charname {#class @character_name 0;character_name = @character_name}
#exec @Exec_charname
} |
thanks guys |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon Jan 12, 2009 11:12 pm |
%expand maybe?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Tue Jan 13, 2009 12:31 am |
nods i tried that, it carried the %expand over into the alias.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Tue Jan 13, 2009 1:20 am |
Try using a #FUNC instead of a #VAR?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|