Hi,
I was trying out the
https://github.com/scottrules44/gpgsTicTacToe
on Android devices.
I was able to get 2 devices connected to each others. However, I was stuck at sendReliably
I believe the original code was using
gpgs.multiplayer.realtime.setListeners({message=dataHandle, room = handleRealtime})
I tried to print lines from dataHandle:
local function dataHandle( event ) print("--------------- dataHandle -----------------") print(json.encode(event)) print("------------------------------------------------") ... ... end
Nothing was printed.
I also try to set listener inside sendReliably() (according to the API document).
from:
gpgs.multiplayer.realtime.sendReliably({roomId = roomId, payload= tostring(myPlayerNum)})
to
gpgs.multiplayer.realtime.sendReliably({roomId = roomId, payload= tostring(myPlayerNum), listener=dataHandle})
Still, in logcat, nothing was printed from dataHandle.
Any help would be appreciated.
Thanks,
Gary