Running functions after LoadByteCode

Started by
3 comments, last by WitchLord 11 years, 4 months ago
Hi I have a problem,
I have a client-server game and the server sends bytecode to clients, so that all run the same scripts.
However I can't really make it work because my engine relies on script function hooks like:

asIScriptFunction *func = mModule->GetFunctionByDecl( "void DoSomething()" );

After loading byte code there are no functions to get :/
How do I solve this?
KAG DEVLOG: http://kagdev.tumblr.com/
Advertisement
Oh my BinaryStream function was all wrong, my bad. But I got absolutely no errors or warnings about this. The byte code loader should inform that nothing got loaded.
KAG DEVLOG: http://kagdev.tumblr.com/
Can you show me what was wrong? I'd like to add validations in the code to catch this scenario.

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

When writing the binary stream, my class didn't increase the buffer pointer while reading and writing. So it was always writing/reading at the same location resulting in something random. So it was wierd there was no error about that.
KAG DEVLOG: http://kagdev.tumblr.com/
Did LoadBytecode() return a negative value? That would indicate an error.

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