1.  

[HEALP] XDevKit with SV_GameSendServerCommand won't work

Discussion in 'BO2 Modding Support' started by errorjack, Nov 11, 2012 with 0 replies and 206 views.

  1. errorjack

    errorjack Contributor

    Messages:
    1,700
    Likes Received:
    431
    I'm trying to do this in VB.NET and I seem to can't get it to work. I always get this error:

    Code (Text):
    Invalid response received from console: Version mismatch, expected 4 but got 2
    When I fix that line by putting a different version of xdevkit.dll and xdrpc.dll, it gives me these errors. When the code is ran:
    Code (Text):
    Object reference not set to an instance of an object.
    An error that appears in the code:
    Code (Text):
    'ExecuteRPC' is not a member of 'XDevkit.IXboxConsole'.
    My code:
    Code (Text):
        Public Sub SV_GameSendServerCommand(ByVal clientIndex As Integer, ByVal command As String)
            Dim options As New XDRPCExecutionOptions(XDRPCMode.Title, &H822C9278UI)
            Dim info As New XDRPCArgumentInfo(Of UInteger)(CUInt(clientIndex))
            Dim info2 As XDRPCArgumentInfo = New XDRPCArgumentInfo(Of UInteger)(1)
            Dim info3 As New XDRPCArrayArgumentInfo(Of Byte())(Encoding.ASCII.GetBytes(command), ArgumentType.[ByRef])
            Dim num As UInteger = DirectCast(xboxConsole, IXboxConsole).ExecuteRPC(Of UInteger)(options, New XDRPCArgumentInfo() {info, info2, info3})
        End Sub