I couldnt get Color Move sample to work and my own game has the same problem. Is there something wrong with the servers or api ?
This were my steps:
in main:
appWarpClient = require "AppWarp.WarpClient"
API_KEY = "API"
SECRET_KEY = "Secret"
STATIC_ROOM_ID = "ROOMID" (made a room and pasted the ID in here)
require "warplisteners"
in game
appWarpClient.initialize(API_KEY, SECRET_KEY)
appWarpClient.connectWithUserName(tostring(os.clock()))
in warplisteners
function onJoinRoomDone(resultCode,roomid)
print(resultCode)
end
function onSubscribeRoomDone(resultCode)
if(resultCode == WarpResponseResultCode.SUCCESS) then
print( "Started!")
else
print( "Room Subscribe Failed")
end
end
function onConnectDone(resultCode)
appWarpClient.joinRoom(ROOMID)
end
function onUpdatePeersReceived(update)
print('something moved')
end
appWarpClient.addRequestListener("onConnectDone", onConnectDone)
appWarpClient.addRequestListener("onJoinRoomDone", onJoinRoomDone)
appWarpClient.addRequestListener("onSubscribeRoomDone", onSubscribeRoomDone)
appWarpClient.addNotificationListener("onUpdatePeersReceived", onUpdatePeersReceived)
onJoinRoomDone This one never gets called!! why ?! I tried this for hours its very frustrating because even the demo doesnt work. Am i doing something wrong ?