- Joined
- Jun 28, 2008
- Messages
- 356
JASS:
globals
//... some variables ...
integer t = 0
endglobals
//... some code ...
function OnlyEnemies takes nothing returns boolean
return (player_team[GetPlayerId(GetOwningPlayer(GetFilterUnit()))] != t)
endfunction
//... some more code ...
This code above saves fine with the map, but when I press the Test button - it leads me to the game menu, instead of the map load screen. However, a small variable name change like this one below fixes everything:
JASS:
globals
//... some variables ...
integer whichteam = 0
endglobals
//... some code ...
function OnlyEnemies takes nothing returns boolean
return (player_team[GetPlayerId(GetOwningPlayer(GetFilterUnit()))] != whichteam)
endfunction
//... some more code ...
WTF?! Someone plz EXPLAIN THIS BULLSHIT Q_Q I'm pretty sure I'm not having any other global/local variables with the name 't'. What is this?