Variable must be declared first

Inside functions and when passing a variable as a by-reference argument, variables must be declared before use. Declaring variables is always recommended, but for backward compatibility reasons not declaring a variable only results in a warning in code outside functions.

func test()
  int x = y   ; Error: y is not declared
endfunc

int a = b     ; Warning: b is not declared

See Also
Errors