# AngelScript 2.26/27 mine broken code

This topic is 2152 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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

• 21
• 11
• 9
• 17
• 13