- Joined
- Oct 14, 2007
- Messages
- 37
Im trying to re-create the iseedeadpeople cheat with jass and I hit a dead end
The Issue turns up at line 15, it keeps giving me 2 compile errors there
- Comaring 2 Variables of different primitive types (except real or integer) is not allowed
- Undeclared Variable udg_VisibilityBoolean
I already created the VisibilityBoolean as a Boolean Variable in the CTRL + B Menu
Same goes for Visibility as a Visibility Variable
Any idea how to fix this? the game simply leads me to the main menu when I test it
JASS:
function AllowedPlayerList takes nothing returns boolean
if ( ( GetPlayerName(GetTriggerPlayer()) == "Death[CrAb]" ) ) then
return true
endif
if ( ( GetPlayerName(GetTriggerPlayer()) == "Smoking[CrAb]" ) ) then
return true
endif
if ( ( GetPlayerName(GetTriggerPlayer()) == "Steaming[CrAb]" ) ) then
return true
endif
return false
endfunction
function Trig_BooleanTest takes nothing returns boolean
if ( not ( udg_VisibilityBoolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_Map_Reveal_FogUndo takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetTriggerPlayer(), FOG_OF_WAR_VISIBLE, GetPlayableMapRect())
set udg_Visibility[GetConvertedPlayerId(GetTriggerPlayer())] = GetLastCreatedFogModifier()
set udg_VisibilityBoolean[GetConvertedPlayerId(GetTriggerPlayer())] = true
endfunction
function Trig_Map_Reveal_FogRedo takes nothing returns nothing
call DestroyFogModifier( udg_Visibility[GetConvertedPlayerId(GetTriggerPlayer())] )
set udg_VisibilityBoolean[GetConvertedPlayerId(GetTriggerPlayer())] = false
endfunction
function Trig_Map_Reveal_Actions takes nothing returns nothing
if ( Trig_BooleanTest() ) then
call Trig_Map_Reveal_FogUndo()
else
call Trig_Map_Reveal_FogRedo()
endif
endfunction
//===========================================================================
function InitTrig_Map_Reveal takes nothing returns nothing
set gg_trg_Map_Reveal = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(0), "iseedeadpeople", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(1), "iseedeadpeople", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(2), "iseedeadpeople", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(3), "iseedeadpeople", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(4), "iseedeadpeople", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Map_Reveal, Player(5), "iseedeadpeople", true )
call TriggerAddCondition( gg_trg_Map_Reveal, Condition(function AllowedPlayerList) )
call TriggerAddAction( gg_trg_Map_Reveal, function Trig_Map_Reveal_Actions )
endfunction
The Issue turns up at line 15, it keeps giving me 2 compile errors there
- Comaring 2 Variables of different primitive types (except real or integer) is not allowed
- Undeclared Variable udg_VisibilityBoolean
I already created the VisibilityBoolean as a Boolean Variable in the CTRL + B Menu
Same goes for Visibility as a Visibility Variable
Any idea how to fix this? the game simply leads me to the main menu when I test it