Example Code: Convert Position To Map Grid – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Since ArmA v1.09 you can use the command toString to convert the integers into letters.


Example:

_str = toString([65 + _t]);

Result is the capital letter A if _t = 0, B if _t = 1, etc.

_str = toString([97 + _t]);

Result is the small letter a if _t = 0, b if _t = 1, etc.

As you can see, you don't need so many if-clauses anymore in order to create these letters.--Timmey 21:08, 5 February 2008 (CET)

Which one

The first line of code in "Solutions" and "Implementation" ar different. "Implementation" seems to be th right one. --alef 10:54, 29 February 2008 (CET)