Expected number but found

From OHRRPGCE-Wiki

Jump to: navigation, 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. Did not include plotscr.hsd by adding include, plotscr.hsd at the top of your scripts file, and then tried to use one of the constants in it.
    Include plotscr.hsd and try compiling again.
  2. Misspelt the name of a constant. Fix yer typo.
  3. 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.

[edit] See Also

My scripts won't compile! Why?

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

Personal tools