Has anyone got this working?
I've been modifying what I think might be an older version of Server Redirect to update it's code to work with the latest stable Sourcemod (1.10) however, I need some help.
If there's another version of a server redirect that works with the latest version of CS:GO then please provide a link.
Else, can I please get some help with this code. The error is:
Code:
server_redirect_11.sp(380) : error 100: function prototypes do not match
and that line is:
Code:
se.socket = SocketCreate(SOCKET_TCP, SocketCreate_Error);
which refers to the naming of the coloured function named like so:
Code:
native bool SocketIsConnected(Handle socket);
native Handle:SocketCreate(SocketType:protocol=SOCKET_TCP, SocketErrorCB:efunc);
native bool:SocketBind(Handle:socket, const String:hostname[], port);
native SocketConnect(Handle:socket, SocketConnectCB:cfunc, SocketReceiveCB:rfunc, SocketDisconnectCB:dfunc, const String:hostname[], port);
native bool:SocketDisconnect(Handle:socket);
native bool:SocketListen(Handle:socket, SocketIncomingCB:ifunc);
native SocketSend(Handle:socket, const String:data[], size=-1);
native SocketSendTo(Handle:socket, const String:data[], size=-1, const String:hostname[], port);
native SocketSetOption(Handle:socket, SocketOption:option, value);
native SocketSetReceiveCallback(Handle:socket, SocketReceiveCB:rfunc);
native SocketSetSendqueueEmptyCallback(Handle:socket, SocketSendqueueEmptyCB:sfunc);
native SocketSetDisconnectCallback(Handle:socket, SocketDisconnectCB:dfunc);
native SocketSetErrorCallback(Handle:socket, SocketErrorCB:efunc);
native SocketSetArg(Handle:socket, any:arg);
native SocketGetHostName(String:dest[], destLen);
..Now, originally, the line:
Code:
se.socket = SocketCreate(SOCKET_TCP, SocketCreate_Error);
..was actually written with a UDP socket, like so:
Code:
se.socket = SocketCreate(SOCKET_UDP, SocketCreate_Error);
..however I tried TCP there but the error still pops up.
...SocketType is declared like this:
Code:
enum SocketType {
SOCKET_TCP = 1,
SOCKET_UDP,
SOCKET_RAW
}
...and SocketErrorCB is declared like this:
Code:
typeset SocketErrorCB
{
function Action (Handle socket, const int errorType, const int errorNum, int arg)
};
The above code that is coloured blue signifies changes I made to the original code (in order to make work with the latest CS:GO SourceMod) according to this page:
https://wiki.alliedmods.net/Sourcepa...yntax#typedefs
...the old code was like this:
Code:
funcenum SocketErrorCB
{
public(Handle:socket, const errorType, const errorNum, any:arg)
};
I see admins have helped with ease the changes needed with this error in other pages, and I've viewed perhaps nearly 10 solutions in other searches on that error, but none of them had the same delcarations so if you can please point out what's incorrect.
Thanks