variable inside variable

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Acidd
Newbie
Posts: 3
Joined: Wed Nov 26, 2014 5:54 am

variable inside variable

Post by Acidd » Sat Dec 13, 2014 5:10 am

let>personaje=1
Let>xdelpersonaje[1]=340




doesn't work
let>x=%xdelpersonaje[%personaje%]% interpetate is let>x=%xdelpersonaje[1]%

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: variable inside variable

Post by hagchr » Sun Dec 14, 2014 9:27 am

Hi, I guess you want to do this:

Code: Select all

Let>personaje=1
Let>xdelpersonaje[1]=340

Let>tmp=xdelpersonaje[%personaje%]
Let>x=%tmp%

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: variable inside variable

Post by hagchr » Sun Dec 14, 2014 9:37 am

Sorry, was too fast, in this case you can simplify it more.

Code: Select all

Let>personaje=1
Let>xdelpersonaje[1]=340
Let>x=xdelpersonaje[%personaje%]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts