Variables and additions?

Shaneypoo

Dedicated Member
Dedicated Member
Nov 24, 2006
61
0
32
Hi,
Im making a script, and i think ive hit a brick wall.
Im trying to use a Variable for abit of an item name and then add a bit on for the rest. For example, if my variable A1 = "XuanWu", how would i do :
give %A1 "Ring". Like, use the a1 Variable, but add a bit of text on to the end. is that possible?
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
Sure...

Hows this... :)
Code:
[@Main]
#ACT
Mov  A0 "XuanWu"
#SAY
Please Select the Element of your <$OUTPUT(A0)> Ring\\
<[ IG ]/@Convert1(IG)>\
<[ GE ]/@Convert1(GE)>\
<[ PH ]/@Convert1(PH)>\
<[ VE ]/@Convert1(VE)>\
<[ SA ]/@Convert1(SA)>\
<[ AT ]/@Convert1(AT)>\
<[ FU ]/@Convert1(FU)>\

[@Covert1()]
#ACT
Mov  A1  %ARG(1)
Addstr  A0  "("
Addstr  A0  %A1
Addstr  A0  ")"
#SAY
Are you sure this is correct?\\
<$OUTPUT(A0)>\\
<[ Yes ]/@GoToNextBit>\

I assume that is basically what you were trying to do.. but the command you were particularly looking for is AddStr
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
If you ever need a hand again, don't hesitate to ask someone else :P

I don't mind helping anyone, but common courtesy would be to reply with a thanks..
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,401
36
275
Germany
:) the other way with FormatStr is :

FormatStr "('%s %s %s')" %A1 %A2 %A3
<$OUTPUT(A9)>

The Output is Save in A9.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,401
36
275
Germany
This you can use for SQL or for other ^^ I see no problem..
It give more Commands like this.
 
Last edited:
Upvote 0

Shaneypoo

Dedicated Member
Dedicated Member
Nov 24, 2006
61
0
32
just checked this thread now, tyvm for your help, you guys saved my ass lol.
 
Last edited:
Upvote 0