Expected number but found

From OHRRPGCE-Wiki
Jump to navigationJump to search

This error occurs when you try to pass something other than a number or constant (or fixed value numeric expression) to certain fields of top level declarations. An example of a line that would trigger this error is

 global variable (pick hero, main hero health) 

If you get this error, you either:

  1. Misspelt the name of a constant. Fix yer typo.
  2. Tried to give a variable value argument (Eg. scripts, non-math functions, variables) outside of a script or plotscript block. This is not possible in HamsterSpeak. Unlike the commands in scripts, where you can pass anything, the arguments of top level declarations like define constant or global variable are only either constant values or text. Find some other way of doing what you were attempting to.

See Also[edit]

My scripts won't compile! Why?

Unrecognised name ___. It has not been defined as script, constant, variable, or anything else