Go
Wc3C.net
»
Warcraft III Modding
»
Developer's Corner
»
Triggers & Scripts
»
"Adding" strings
"Adding" strings
05-15-2007, 12:33 AM
#1
darkwulfv
Ok, I'm a little confused on how this is done. I need to add a string, and a variable... string... Here's the line.
JASS:
local
string
s
=
"+"
+
R2S
(
Xdamage
)
I'm unsure as to whether this will make (say Xdamage is equal to 3):
"+3".
Did I code that right?
05-15-2007, 12:37 AM
#2
Rising_Dusk
Actually...
That would display "+3.000000"
If you wanted to show "+3" you'd need --
JASS:
local
string
s
=
"+"
+
I2S
(
R2I
(
Xdamage
))
Assuming Xdamage is declared as a real, of course.
05-15-2007, 12:57 AM
#3
DioD
much more better to use R2SW - formated string
05-15-2007, 01:03 AM
#4
darkwulfv
Thanks Dusk, I'll go set that up. It's floating text that appears often, and having a ton of 6 decimal floating texts isn't good O.o