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?
Running functions after LoadByteCode
Started by thd.MM, Nov 26 2012 08:51 AM
4 replies to this topic
Sponsor:
#2 Members - Reputation: 181
Posted 26 November 2012 - 09:30 AM
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/
#3 Moderators - Reputation: 2327
Posted 26 November 2012 - 09:48 AM
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
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
#4 Members - Reputation: 181
Posted 27 November 2012 - 03:50 AM
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/
#5 Moderators - Reputation: 2327
Posted 27 November 2012 - 06:11 AM
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
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game






