I've narrowed it down to this somewhere:
Specificaly this line: call SetItemPosition(droppedItem, 1, 1)
I comment that line out, the trigger doesn't do what I want of course, but it doesnt crash. I uncomment it, and it crashes WC3... I've confirmed with the debug line that the variable does indeed have the right thing stored when it hits that line.
JASS:
function Trig_CTF_Flag_Dropped_Actions takes nothing returns nothing
local item droppedItem = GetManipulatedItem()
local integer playerID = 0
loop
exitwhen playerID == bj_MAX_PLAYERS
if (droppedItem == playerFlags[playerID]) then
call BJDebugMsg("DEBUG. droppedItem = " + GetItemName(droppedItem))
call SetItemPosition(droppedItem, 1, 1)//GetUnitX(playerCops[playerID]), GetUnitY(playerCops[playerID]))
//call UnitShareVision(GetTriggerUnit(), Player(playerID), false)
endif
set playerID = playerID + 1
endloop
endfunction
I comment that line out, the trigger doesn't do what I want of course, but it doesnt crash. I uncomment it, and it crashes WC3... I've confirmed with the debug line that the variable does indeed have the right thing stored when it hits that line.