Skip to main content
GameDev.net gamedev.net
🔒 Locked

Running functions after LoadByteCode

Started by ruphert Nov 26, 2012 at 2:51 PM 3 replies 1.6k views
Original Post
ruphert
ruphert
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/
ruphert
ruphert
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/
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel
ruphert
ruphert
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/
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.