| 11-23-2003, 05:15 AM | #1 |
Is there a method for converting a String-type representing an existing variable in the map script into a [variable type in question] pointer? May sound a bit ambiguous, but here's an example Assume I have a function written (the one you will reply to this post with!), and I pass it a string that is the JASS name for a variable in a map, like, gg_rct_Region11. The function knows it's returning regions. What it will do is take the string and return the reference to the variable of type region with that exact name. I don't see an obvious way to do this, because any attempt to directly use a string in place of a region variable name results in a type conversion error (as expected). I know in Java everything's name can be expressed in Strings and every variable has type conversion to Strings, meaning, essentially, you can manipulate the NAME of the variable you are trying to work with in a loop or recursion. Is this possible in JASS? Thanks, Allquixotic. |
| 11-23-2003, 10:00 AM | #2 |
No, AFAIK there is no way to do that. What are trying to achieve with that? |
| 11-23-2003, 11:55 AM | #3 |
You can simple pass region / rect handle into that function. I'm unable to guess JASS algorythms where string to handle conversion is required emote_sweat |
