Jump to content
  • 0

var2string(); & string2var();


Question

Posted (edited)

I need a function that returns variable name as string, and a function that takes string and returns variable.

I felt that this would be really useful for me.

 

For example, I have

$@Test[1] = 100;
var2string($@Test[1]);

dispbottom var2string($@Test[1]);

//would result displaying $@Test[1] on the bottom.

While the other way round is also possible.

 

for example.

$@Test[1] = 100;
.varstring$ = "Test";

.result = 200 + string2var("$@" + .varstring$ + "[1]");
dispbottom .result;

//would results to displaying 300 on the bottom.

Is this possible?

 

Imagine the tons of possibilities with the availability of this function.

 

I could make a lot of scripts that are once impossible into reality!.

Edited by gekigengar

5 answers to this question

Recommended Posts

Posted (edited)

 

There is nothing on rAthena wiki regarding setD getD.

Setd

Getd

Those pages have existed since January 2009. o.o;

As Jonne said, run a search through doc/script_commands.txt to see if a command exists.

 

But but, Uncle Google didn't even link them to those page! ;_;

 

try typing

rathena setd getd

will get you to hercules stuff!

Edited by gekigengar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...