HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing a location after using DefineStartLocationLoc

03-23-2007, 11:40 PM#1
grupoapunte
Hey, well i made this function but i dont know if it may have problems, it didnt so far but maybe i just been lucky, the thing is, when i RemoveLocation(l) is the start location that you get using GetPlayerStartLocationLoc(p) lost? for example i know that if you RemovePlayer(Player(0)) the game crashes, or at least it did for me.

Collapse JASS:
function RandomStartLocForPlayer takes player p returns nothing
    local location l = GetRandomLocInRect(gg_rct_StartArea)
    call DefineStartLocationLoc(p, l)
    call RemoveLocation(l)
    set l = null
endfunction

thanks!
03-23-2007, 11:44 PM#2
Anopob
Well isn't "RemovePlayer" removing a player...so I think it does crash because of that. About the location, I don't think so.
03-24-2007, 12:10 AM#3
grupoapunte
yeah i kno, the removeplayer was just a sample i used the right function when it crashed, i was too lazy to go and look for the function name :P