- Joined
- Jul 10, 2007
- Messages
- 6,306
I made an interesting test script... I'm wondering what would happen if it were run : )
Will all of the syncs run or will it stop when it gets a sync?
o-o
I'd test it myself, but I can't test it solo and I don't have any friends online to test with, so I'm stuck ^_^. Nobody ever joins a game hosted for testing something anymore.
JASS:
struct tester extends array
private static string array playing
private static gamecache gc
private static method test takes nothing returns nothing
local integer i = 11
set gc = InitGameCache("hello")
set playing[GetPlayerId(GetLocalPlayer())] = "t"
call StoreString(tester.syncer, "data", I2S(GetPlayerId(GetLocalPlayer())), "t")
call TriggerSyncStart()
call SyncStoredString(tester.syncer, "data", I2S(GetPlayerId(GetLocalPlayer())))
call TriggerSyncReady()
loop
if (playing[i] != null) then
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, GetPlayerName(Player(i)) + " is playing")
endif
exitwhen i == 0
set i = i - 1
endloop
endmethod
private static method onInit takes nothing returns nothing
call TimerStart(CreateTimer(), 0, false, function thistype.test)
endmethod
endstruct
Will all of the syncs run or will it stop when it gets a sync?
o-o
I'd test it myself, but I can't test it solo and I don't have any friends online to test with, so I'm stuck ^_^. Nobody ever joins a game hosted for testing something anymore.