Venture Posted February 16, 2014 Posted February 16, 2014 (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 February 16, 2014 by gekigengar Quote
Jonne Posted February 16, 2014 Posted February 16, 2014 Var to String should be tought. Other way around, check for SetD and GetD 1 Quote
Venture Posted February 16, 2014 Author Posted February 16, 2014 (edited) Var to String should be tought. Other way around, check for SetD and GetD You are right, I never knew such function exist. There is nothing on rAthena wiki regarding setD getD. I found it on Hercules Wiki. http://hercules.ws/wiki/Setd http://hercules.ws/wiki/Getd I think thats all I need, Thank you! Edited February 16, 2014 by gekigengar Quote
Jonne Posted February 16, 2014 Posted February 16, 2014 Look through doc/script_commands.txt or whats it called Quote
Euphy Posted February 16, 2014 Posted February 16, 2014 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. Quote
Venture Posted February 17, 2014 Author Posted February 17, 2014 (edited) There is nothing on rAthena wiki regarding setD getD. SetdGetd 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 February 17, 2014 by gekigengar Quote
Question
Venture
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
While the other way round is also possible.
for example.
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 gekigengar5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.