|
Somarc Newbie
Joined: 19 May 2006 Posts: 6 Location: Kansas
|
Posted: Sun Sep 06, 2009 11:42 pm
Why don't this work? |
I'm not a coder so I keep my stuff pretty simple, I play Duris and I have a problem with getting a var to assign. I have an alias for a spell lets say "ab" for "cast 'acid blast' " so the alias reads ab %1;%1 = @tar ; then i have buttons for my attack spells using that variable so on the command line I should be able to put "ab mob" then all my subsequent attacks using buttons, the buttons work but the variable has nothing in it. The part that really baffles me is it worked for awhile now it don't work at all. So, whats wrong?
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Sep 07, 2009 12:37 am |
First of all, when assigning variables, the sytanx is:
variable=value
Second, when assigning variables, you never use the @ symbol, so...
tar=%1
instead of
%1=@tar.
That should fix your problems. If not, you'll need to post more on what's happening.
Charneus |
|
|
|
Somarc Newbie
Joined: 19 May 2006 Posts: 6 Location: Kansas
|
Posted: Mon Sep 07, 2009 2:29 am |
ok so i wrote it wrong this is actually whats in my settings "cast 'bigby' %1;tar = %1" and just after I posted this I logged on and it worked exactly the way it should... logged off and back on and it don't work again... oh btw this is my button setting " b @tar "
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Sep 08, 2009 2:31 am |
Can you post the actual code from your button? Best is to copy the XML version of the button and post it here, within code markers, like this:
Code: |
[code]
your xml code here
[/code]
|
|
|
|
|
Somarc Newbie
Joined: 19 May 2006 Posts: 6 Location: Kansas
|
Posted: Wed Sep 09, 2009 11:52 am |
Code: |
<button autosize="false" width="36" height="23" color="#8000FF" textcolor="silver" priority="4" id="1052">
<caption>Bigby</caption>
<value>b @tar</value>
</button>
|
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Sep 09, 2009 2:22 pm |
I just tried the code and it worked fine for me, so me guess is that the @tar variable is no longer visible to the button or is no longer defined.
The easiest way to tell this is to look at the code for the button. If the variable shows up as red, it's not visible/accessible.
Here's the code I had
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="cb" copy="yes">
<value>cast 'bigby' %1;tar = %1</value>
</alias>
<button autosize="false" width="36" height="23" textcolor="silver" priority="4" copy="yes">
<caption>Bigby</caption>
<value>b @tar</value>
</button>
</cmud>
|
|
|
_________________ Asati di tempari! |
|
|
|
|
|