Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

Call sq_pushroottable before registering standard library

Last post 11-25-2009, 1:08 PM by Daise. 0 replies.
Sort Posts: Previous Next
  •  11-25-2009, 1:08 PM 3583

    Call sq_pushroottable before registering standard library

    This is something I only just realised after wondering for ages why standard library calls (sin, cos, clock, etc) weren't working.

    Nothing in the docs mentions you need to call sq_pushroottable(vm) before calling sqstd_register_mathlib(vm) (etc).  I only noticed it in some code someone posted in another forum post, and it worked :)  Perhaps a note could be added to the help docs (sqstdlib2.chm) to save other people struggling with the same problem.

    Er, otherwise this is my first post and I just like to say how easy I've found Squirrel to use.  Thanks Alberto! Beer [B]
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems