Frictional Games Forum (read-only)
String Conversion - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: String Conversion (/thread-4637.html)



String Conversion - SLi78 - 09-21-2010

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

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

Can someone help, please.


RE: String Conversion - gosseyn - 09-21-2010

look here, maybe you will find something http://www.angelcode.com/angelscript/sdk/docs/manual/doc_script.html


RE: String Conversion - SLi78 - 09-21-2010

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

I've looked the AngelScript Site already but couldn't find something that would help me.


RE: String Conversion - jens - 09-21-2010

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);


RE: String Conversion - MulleDK19 - 09-21-2010

(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

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

Can someone help, please.

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