Advertisement

[OpenTNL] Tutorial

Started by May 06, 2005 11:11 AM
0 comments, last by hplus0603 19 years, 9 months ago
Hello every-one I am quite new here and I am trying to get through this openTNL tutorial : http://opentnl.sourceforge.net/doxydocs/simpletutorial.html But on that line : TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcMessageServerToClient, (const char *messageString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) { ... } I have got this error : i:\Network\stdafx.h(27): error C2664: 'TNL::RPCEvent::RPCEvent(TNL::RPCGuaranteeType,TNL::RPCDirection)' : cannot convert parameter 1 from 'TNL::RPCDirection' to 'TNL::RPCGuaranteeType' Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) I was wondering if you could help me, by the way I am on visual.net ! I thank you for your help, Erwan
It seems that your use of that macro is different from the way the macro expects it to be used. If it's a tutorial, it's likely for a different version of OpenTNL, or it has just gotten things wrong and not compiled it with a compiler with good error checking.

Reading the error, I would guess it says that you're passing RPCDirServerToClient (a direction type) where it'd want something like RPCGuaranteedOrdered to be passed (a guaratee type). Verify the usage of this macro with the documentation to see whether this is indeed the problem.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement