Jump to content

Gameserver query


Intosia
 Share

Recommended Posts

Hi,

Im trying to make a simple game server query thing for myself... I dont get any data back. What is wrong? The server Ip and Port are correct.

The C string is '\xff\xff\xff\xffgetstatus'. What do i send? the chr(255), or ÿÿÿ version?

$str = Chr(255)&Chr(255)&Chr(255)&Chr(255)&"getstatus"
;$str = "ÿÿÿÿgetstatus"
ConsoleWrite($str)

TCPStartup ()

$socket = UDPOpen("208.122.34.16", 28960)
If @error <> 0 Then ConsoleWrite("Err")


    $status = UDPSend($socket, $str)
    ConsoleWrite($status)
    If $status = 0 then 
        MsgBox(0, "ERROR", "Error while sending UDP message: " & @error)
        Exit
    EndIf
    
While 1
    $data = UDPRecv($socket, 50)
    If $data <> "" Then
        ConsoleWrite($data)
    EndIf
    
WEnd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...