Hi there and congrats on AngelScript. Very nice work :)
I 've been evaluating it the last couple of days and, although doumentation is lacking, I was able to add it in my project and actually get it working (yay!).
But I 'm having a problem now, that I don't seem to be able to solve by myself.
I have bound this member function at some point:
GuiButton* Gui::AddButton(const std::string& text, const Vector2& pos, const Vector2& size);
// bound using:
engine->RegisterObjectMethod("Gui", "GuiButton& AddButton(const string& in, const Vector2& in, const Vector2& in)", asMETHOD(Gui, AddButton), asCALL_THISCALL);
// called from script:
GuiButton@ btn = GUI.AddButton("Hello world 3!", Vector2(200, 50), Vector2(100, 50));
[EDIT]
I forgot to tell you what this function is doing :p
When called, it creates a GuiButton object on the heap, adds it in an internal list and returns it as a result. Pretty basic.
[/EDIT]
If I run the script like this (i.e. asking for a GuiButton handle), I get this assertion:
/as_compiler.cpp:342: void asCCompiler::CompileStatementBlock(asCScriptNode*, bool, bool*, asCByteCode*): Assertion `tempVariables.GetLength() == 0' failed.
1) Is this my mistake?
2) Any way to make it work?
Thanks a lot for any help :)