HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TriggerSyncStart Failing?

04-24-2009, 07:56 PM#1
Darthfett
I've been working a ton on my map, basically making the entire map's code up to a 'standard' (half the stuff in it doesn't work, basically).

Today, I decided I'd test the map, just to see how much worked (and see if any bugs occured), but for some reason, the GetHost function is not working, at all:

Collapse JASS:
library GetHost

globals
    player host
endglobals

function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger(g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart()
    call SyncStoredInteger(g, "Map", "Host" )
    call TriggerSyncReady()
    set host = Player( GetStoredInteger(g, "Map", "Host" )-1)
    call FlushGameCache(g )
    set g = null
endfunction

endlibrary

I have tried running it at Map Initialization, and at 0.1 seconds afterward (using a timer), and both times it stops at TriggerSyncStart. I don't even know what this function does! :o

Also, is there an op limit for the map initialization? I've got so much variables and initialization stuff that has to be done, that I'm afraid I'm going to hit the OP limit (if it exists).
04-24-2009, 08:03 PM#2
akolyt0r
Quote:
Originally Posted by Darthfett
Also, is there an op limit for the map initialization? I've got so much variables and initialization stuff that has to be done, that I'm afraid I'm going to hit the OP limit (if it exists).

Start a new thread with ExecuteFunc or TriggerExecute ...
04-24-2009, 08:07 PM#3
Darthfett
Quote:
Originally Posted by akolyt0r
Start a new thread with ExecuteFunc or TriggerExecute ...

So this means that there is indeed an OP limit during map initialization? I knew how to avoid it, just wanted to check and make sure.
04-24-2009, 08:39 PM#4
akolyt0r
yeah i think so, but it doesnt really matter, starting a new thread wont hurt..