1. Think you have what it takes to join staff? Click here and check out the Staff thread to find out more information!
  2. Looking to spice up your game collection with a copy of the highly anticipated Bungie title Destiny? Hop on your ship and engage its hyper drive, this contest is going to be a heated one! Visit the contest by clicking here.
  3. Hello Guest, our very own Vanilla Minecraft Server is now up! Be sure to grab a few friends and check out the server here so that you guys can start your very own faction! Check it out HERE!

[HEALP] XDevKit with SV_GameSendServerCommand won't work

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

  1. errorjack

    errorjack Contributor

    Messages:
    1,705
    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