Inline variable declaration

From GECK
Jump to: navigation, search

Inline variable declaration is a new scripting feature added by xNVSE 6.1.0.


NVSE expressions can now declare variables, without you needing to explicitly declare them on top.

Before

int iCount
let iCount := 10

After

let int iCount := 10

More Examples

Using Let Macro and inline variable declaration together:

int iCount = 10
foreach array_var aIter <- aArr
  ; do stuff with aIter
loop
if eval ref rRef = GetCrosshairRef && IsReference rRef
  ; do something with rRef
endif

See Also