Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ysc3839 on Aug 01, 2015, 03:38 PM

Title: About the socket plugin.
Post by: ysc3839 on Aug 01, 2015, 03:38 PM
function StartSocket()
{
Socket <- NewSocket("DataFunc");
Socket.Start(1234, 5);
}

function DataFunc(client, data)
{
print(client + ":" + "data");
}
I use this code to create a server. But when the client send a messase, the server crashed. What's the matter?
Title: Re: About the socket plugin.
Post by: ysc3839 on Aug 01, 2015, 05:22 PM
In the source code SocketInterfaces.cpp, line 250. (link (https://bitbucket.org/stormeus/0.4-sockets/src/4437c4c929ff348b1fd239d382e6ec2f9fe39e1d/SocketInterfaces.cpp?at=master#SocketInterfaces.cpp-250))
I change f(uc, (char*)p->data); to f((int)uc, (char*)p->data);It won't crash any more. Who can tell me what cause this bug?
And please fix it soon! :)
Title: Re: About the socket plugin.
Post by: ysc3839 on Aug 02, 2015, 07:41 AM
@Stormeus Please see this!