🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AngelScript 2.26/27 mine broken code

Started by
0 comments, last by WitchLord 10 years, 10 months ago

From some time , the console in OpenDungeons GPL game , development branch does not work at all , the bug seems to be in


    context->Prepare(builder->GetModule()->GetFunctionByDecl(
            "void executeConsoleCommand(string &in, string[] &in)"));

And especially :

builder->GetModule()->GetFunctionByDecl(
"void executeConsoleCommand(string &in, string[] &in)")

seeems to return NULL value. Althought function is "void executeConsoleCommand(string &in, string[] &in)" is defined in proper *.as file .

Here's repo : http://sourceforge.net/p/opendungeons/git/ci/development/tree/ . Scripts are in script dir, source is in source dir ;) .

Is there any way I can check whether my code is syntax valid without running the AS c++ machine ? ( I mean cmd line tool ) . IF it;s too simple , I am sorry , but I don't have time for another position for another subystem maintainer. ( Hey , any dude with AS knowledge would be welcome in OD team ) .

EDIT : Err wait I have compile time errors in console.as ;)

Advertisement

Sounds like you're missing some error handling in your code. There is no use trying to execute scripts if the compilation failed.

I took a quick look at the ASWrapper.cpp in your svn and I see you're ignoring the return code from builder->BuildModule(). If this return code is negative it means the compilation failed, and you should probably show popup message to the user or something similar in this case.

Regards,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement