Difference between revisions of "String Formatting"
added note on nvse alternative
imported>Odessa m (→FOSE and NVSE: linked to scan codes) |
imported>Odessa (added note on nvse alternative) |
||
Line 101: | Line 101: | ||
</pre> | </pre> | ||
==NVSE Alternative To Formatting== | |||
As an alternative to string formatting, with NVSE functions such as [[Print]], you can use string concatanation and the [[ToString|ToString($)]] function. | |||
<pre> | |||
int iVal | |||
ref rActor | |||
PrintToConsole "Value of iVal is %g and name of rActor is %n" iVal, rActor | |||
; can instead be written as: | |||
Print "Value of iVal is " + $iVal + " and name of rActor is " + $rActor | |||
</pre> | |||
See the [[Tutorial: String Variables|tutorial on string variables]] for more information. | |||
==See Also== | ==See Also== | ||
*[[ShowMessage]] | *[[ShowMessage]] | ||
*[[MessageEx]], [[MessageBoxEx]] | *[[MessageEx]], [[MessageBoxEx]] | ||
*[[PrintToConsole]], [[DebugPrint]] | *[[PrintToConsole]], [[DebugPrint]] | ||
*[[String Variable]], [[Print]] | |||
[[Category:NVSE]] | [[Category:NVSE]] | ||
[[Category:String Variables]] | [[Category:String Variables]] |