Sign in to follow this  
paul424

AngelScript 2.26/27 mine broken code

Recommended Posts

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 ;)

Edited by paul424

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this