Editing ToString

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 3: Line 3:
{{Function
{{Function
  |origin = NVSE
  |origin = NVSE
  |summary = Added by NVSE V4. Attempts to convert an expression to a string. For numeric expressions, the result is a string representation of the numeric value. For objects, it is the name of the object if available; otherwise it is the formID expressed in hexadecimal notation.  
  |summary = Added by NVSE V4. Attempts to convert an expression to a string. For numeric expressions, the result is a string representation of the numeric value. For objects, it is the name of the object if available; otherwise it is the formID expressed in hexadecimal notation. For string expressions no conversion is necessary.
 
For string variables, conversion is only necessary for vanilla and old NVSE functions (eg: It is needed for [[PrintToConsole]], but not for [[Print]])


You can also use the shorthand alias '$'.
You can also use the shorthand alias '$'.
Line 23: Line 21:
<pre>
<pre>
string_var my_string
string_var my_string
int iValue


let my_string := $SunnyREF
let my_string := "whatever"


my_string == "Sunny Smiles" ; thats the name of the reference
MessageEx $my_string
 
let iValue := 13
let my_string := $iValue + " and " + $VCG01 ; an int and a quest
 
my_string == "13 and Ain't That a Kick in the Head"
</pre>
</pre>


You only need to use it with string variables for vanilla and old NVSE functions:
<pre>
<pre>
string_var my_string
string_var my_string
ref rActor


let my_string := "whatever"
let rActor := SunnyREF
MessageEx $my_string
 
let my_string := $rActor
 
my_string == "Sunny Smiles" ; thats the name of the reference
</pre>
</pre>


Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)