Added support for string vars on commands that require a string

- Fixes bugreport:7901, thanks to Angelmelody
  http://hercules.ws/board/tracker/issue-7901-about-pass-variable-type-as-function-parameter

Signed-off-by: Haru <haru@dotalux.com>
Whitespace fixes in script.c

Signed-off-by: Haru <haru@dotalux.com>
Modernized syntax and fixed errors in the sample scripts

Signed-off-by: Haru <haru@dotalux.com>
De-duplicated code for buildin_select and buildin_prompt

Signed-off-by: Haru <haru@dotalux.com>