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


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

Posts: 23
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
gosseyn Offline
Member

Posts: 63
Joined: Sep 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
SLi78 Offline
Junior Member

Posts: 23
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 545
Joined: Jun 2009
Reputation: 10
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)