Is there a way to convert a string of letters into a number, and vice versa? I'm storing my game's data with a number array, which unfortunately doesn't allow for string entries, so I'd like to know if it's possible to manipulate numbers in a way so that I can store small bits of text, such as a name.
I tried using the Convert String to Number function that's built into MMF, but that only works for numbers, not letters. Is there a method I could use to represent each letter of the alphabet as a number and scrunch them together in the same variable, or will I have to dedicate an entire row of my array to storing letters individually (i.e. 1 = A, 2 = B, etc)?
It is possible, it would just be a very large number for a short, simple string. Your other alternative is to either dedicate a row as you mentioned, or you could try using another array type that takes numbers and strings.
String arrays are much better to use, since u can easily store numbers as strings and retrieve them back. You might want to consider changing your array type.
Either use a string array or a row structure and the formatted object can convert char to the ascii number. Using an array of stings would be easier though .
i don't remember if mmf has functions for converting characters to ascii values (which for letters begin at 65), but if it does then you can just run through a character at a time and convert them that way
Yeah, I probably should have stuck with a string array, but unfortunately, that would require me going back through all of my events (and we're talking three years worth of events ) and adding Val() tags wherever I refer to a value. So, with this in mind, using a row in my array is probably the best way to go at this point.