GameServiceEventError$ ( event )

Parameters

event - live event handle.

Description

Returns a service event diagnostic.

Successful events normally have an empty diagnostic. Use the status for game logic and this String for explanations. Provider-specific diagnostic codes may also appear in the JSON payload.

All game service commands run on the main Blitz runtime thread and are prohibited in Worker Functions.

See the Game Services guide for setup and the playable target game.

See also: InitGameServices, PollGameServiceEvent, GameServiceEventStatus.

Example

; GameServiceEventError Example
; -----------------------------

Graphics 640,480,0,2
Print "Native game services"
Print "Configure an iOS or Android export for live services."

Local request=InitGameServices()
If request=0 Then Print GameServiceLastError()
Local deadline=MilliSecs()+125000
While request>0 And MilliSecs()<deadline
    Local event=PollGameServiceEvent()
    If event
        Print "Kind: "+GameServiceEventKind(event)
        Print "Request: "+GameServiceEventRequest(event)
        Print "Status: "+GameServiceEventStatus(event)
        Print GameServiceEventError(event)
        Local payload=GameServiceEventData(event)
        Print JsonStringify(payload)
        FreeJson payload
        If GameServiceEventRequest(event)=request Then request=0
        FreeGameServiceEvent event
    EndIf
    If KeyHit(1) Then Exit
    Delay 10
Wend

Print "Press any key to close."
WaitKey
End

Index