Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Running functions after LoadByteCode


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 26 November 2012 - 08:51 AM

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?

Sponsor:

#2 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

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.

#3 Andreas Jonsson   Moderators   -  Reputation: 3291

Like
0Likes
Like

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

#4 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

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.

#5 Andreas Jonsson   Moderators   -  Reputation: 3291

Like
0Likes
Like

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS