Example Code: Convert Position To Map Grid – Talk
Jump to navigation
Jump to search
No edit summary |
(Which one) |
||
Line 13: | Line 13: | ||
As you can see, you don't need so many if-clauses anymore in order to create these letters.--[[User:Timmey|Timmey]] 21:08, 5 February 2008 (CET) | As you can see, you don't need so many if-clauses anymore in order to create these letters.--[[User:Timmey|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. --[[User:Alef|alef]] 10:54, 29 February 2008 (CET) |
Revision as of 10:54, 29 February 2008
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)