- Joined
- Nov 7, 2004
- Messages
- 48
Can anyone tell me what's wrong with these JASS scripts?
AND
The ones that WE says have errors are
call CreateTextTagUnitBJ( ( udg_playername + ( "Says" + GetEventPlayerChatString() ) ), udg_hero, 0, 10, 100, 100, 100, 0 )
AND
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, ( udg_playername + UnitId2StringBJ(GetUnitTypeId(udg_hero)) ) )
EDIT: I had tried remaking the triggers and they work now,this has been solved.
JASS:
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
string udg_playername
unit udg_hero = null
// Generated
trigger gg_trg_Localized_Chat_Init = null
trigger gg_trg_Localized_Chat_Unit = null
trigger gg_trg_Localized_Chat = null
trigger gg_trg_Show_Variables = null
endglobals
function InitGlobals takes nothing returns nothing
set udg_playername = ""
endfunction
function Trig_Localized_Chat_Actions takes nothing returns nothing
local player udg_playername
local unit udg_hero
call CreateTextTagUnitBJ( ( udg_playername + ( "Says" + GetEventPlayerChatString() ) ), udg_hero, 0, 10, 100, 100, 100, 0 )
endfunction
//===========================================================================
function InitTrig_Localized_Chat takes nothing returns nothing
set gg_trg_Localized_Chat = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Localized_Chat, GetLocalPlayer(), "", false )
call TriggerAddAction( gg_trg_Localized_Chat, function Trig_Localized_Chat_Actions )
endfunction
AND
JASS:
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
string udg_playername
unit udg_hero = null
// Generated
trigger gg_trg_Localized_Chat_Init = null
trigger gg_trg_Localized_Chat_Unit = null
trigger gg_trg_Localized_Chat = null
trigger gg_trg_Show_Variables = null
endglobals
function InitGlobals takes nothing returns nothing
set udg_playername = ""
endfunction
function Trig_Show_Variables_Actions takes nothing returns nothing
local player udg_playername
local unit udg_hero
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, ( udg_playername + UnitId2StringBJ(GetUnitTypeId(udg_hero)) ) )
endfunction
//===========================================================================
function InitTrig_Show_Variables takes nothing returns nothing
set gg_trg_Show_Variables = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Show_Variables, GetLocalPlayer(), "-sv", true )
call TriggerAddAction( gg_trg_Show_Variables, function Trig_Show_Variables_Actions )
endfunction
call CreateTextTagUnitBJ( ( udg_playername + ( "Says" + GetEventPlayerChatString() ) ), udg_hero, 0, 10, 100, 100, 100, 0 )
AND
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, ( udg_playername + UnitId2StringBJ(GetUnitTypeId(udg_hero)) ) )
EDIT: I had tried remaking the triggers and they work now,this has been solved.