- Joined
- Aug 18, 2013
- Messages
- 71
Hey guys, I've been searching around for this a long time and no one ever can seem to explain it to me.
When Using Jass, Do I use the unit-type variable type or integer when using functions such as spawn unit. I'm always forced to manually type unit types (Ex: 'f000') into the function because putting either variable type into that parameter never works. Integers don't work, unit-type doesn't work. And it honestly annoys the fuck out of me.
My code currently wont display anything.
I have no idea...
When Using Jass, Do I use the unit-type variable type or integer when using functions such as spawn unit. I'm always forced to manually type unit types (Ex: 'f000') into the function because putting either variable type into that parameter never works. Integers don't work, unit-type doesn't work. And it honestly annoys the fuck out of me.
My code currently wont display anything.
JASS:
function Trig_List_Unit_Types_Actions takes nothing returns nothing
local integer i = 0
local integer max = 5
//start human
set i = 0
loop
call DisplayTextToPlayer(Player(0),0,0,UnitId2String(udg_HumanCards[i]))
exitwhen i == max
set i=i+1
endloop
//star orc
set i = 0
loop
call DisplayTextToPlayer(Player(0),0,0,UnitId2String(udg_OrcCards[i]))
exitwhen i == max
set i=i+1
endloop
//start night elf
set i = 0
loop
call DisplayTextToPlayer(Player(0),0,0,UnitId2String(udg_UndeadCards[i]))
exitwhen i == max
set i=i+1
endloop
//start undead
set i = 0
loop
call DisplayTextToPlayer(Player(0),0,0,UnitId2String(udg_NightElfCards[i]))
exitwhen i == max
set i=i+1
endloop
endfunction
//===========================================================================
function InitTrig_List_Unit_Types takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( t, Player(0), "-unittypes", true )
call TriggerAddAction( t, function Trig_List_Unit_Types_Actions )
set t= null
endfunction
I have no idea...