Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String Conversion
SLi78 Offline
Junior Member

Posts: 23
Threads: 6
Joined: Sep 2010
Reputation: 0
#1
String Conversion

Hi there,

for some debugging i want to convert a float to string, so i can put the value in a mesage.

I've tried

Print(string(GetGlobalVarFloat("Timerspeed")), false);
but that doesnt work.

Can someone help, please.
09-21-2010, 01:24 PM
Find
gosseyn Offline
Member

Posts: 63
Threads: 7
Joined: Sep 2010
Reputation: 1
#2
RE: String Conversion

look here, maybe you will find something http://www.angelcode.com/angelscript/sdk...cript.html
09-21-2010, 01:34 PM
Find
SLi78 Offline
Junior Member

Posts: 23
Threads: 6
Joined: Sep 2010
Reputation: 0
#3
RE: String Conversion

(09-21-2010, 01:34 PM)gosseyn Wrote: look here, maybe you will find something http://www.angelcode.com/angelscript/sdk...cript.html

I've looked the AngelScript Site already but couldn't find something that would help me.
09-21-2010, 01:36 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#4
RE: String Conversion

Print("Var: "+GetGlobalVarFloat("Timerspeed")); or if you do not want it in the log, rather see it on screen use AddDebugMessage("Var: "+GetGlobalVarFloat("Timerspeed"), false);
09-21-2010, 01:39 PM
Website Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#5
RE: String Conversion

(09-21-2010, 01:24 PM)SLi78 Wrote: Hi there,

for some debugging i want to convert a float to string, so i can put the value in a mesage.

I've tried

Print(string(GetGlobalVarFloat("Timerspeed")), false);
but that doesnt work.

Can someone help, please.

This'll convert it to string:
""+GetGlobalVarFloat("Timerspeed");

[Image: 16455.png]
09-21-2010, 02:30 PM
Find




Users browsing this thread: 1 Guest(s)