Hey there everyone, I've been away for 2.5 years or so, and finally found my map back that I had started then. I made a custom race, using a custom build animation, which, at some point in time worked, I remember. But when I loaded up the map and tried it out, I got tons of "Unknown compile errors".
In those 2.5 years I've become an actual programmer, so using those terms would be no issue.
If more information is needed as to where the errors occur precisely, just say the word.
This is the Jass file:
Thanks in advance!
In those 2.5 years I've become an actual programmer, so using those terms would be no issue.
If more information is needed as to where the errors occur precisely, just say the word.
This is the Jass file:
Code:
//TESH.scrollpos=0
//TESH.alwaysfold=0
library DemonBirth initializer Init
globals
unit array Dummy
endglobals
private function Create takes nothing returns boolean
local unit u = GetTriggerUnit()
if GetUnitAbilityLevel(u, udg_Ability) > 0 then
set Dummy[GetUnitUserData(u)] = CreateUnit(GetTriggerPlayer(), udg_Dummy, GetUnitX(u), GetUnitY(u), 0.00)
call SetUnitVertexColor(u, 0, 0, 0, 0)
endif
set u = null
return false
endfunction
private function End takes nothing returns boolean
local unit u = GetTriggerUnit()
local integer id
if GetUnitAbilityLevel(u, udg_Ability) > 0 then
set id = GetUnitUserData(u)
call KillUnit(Dummy[id])
set Dummy[id] = null
call SetUnitVertexColor(u, 255, 255, 255, 255)
endif
set u = null
return false
endfunction
private function Death takes nothing returns boolean
local unit u = GetTriggerUnit()
local integer id
if GetUnitAbilityLevel(u, udg_Ability) > 0 then
set id = GetUnitUserData(u)
if GetUnitState(Dummy[id], UNIT_STATE_LIFE) > 0 then
call RemoveUnit(Dummy[id])
endif
endif
set u = null
return false
endfunction
private function Init takes nothing returns nothing
local trigger t1 = CreateTrigger()
local trigger t2 = CreateTrigger()
local trigger t3 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t1, Player(index), EVENT_PLAYER_UNIT_CONSTRUCT_START, null)
call TriggerRegisterPlayerUnitEvent(t2, Player(index), EVENT_PLAYER_UNIT_CONSTRUCT_FINISH, null)
call TriggerRegisterPlayerUnitEvent(t3, Player(index), EVENT_PLAYER_UNIT_DEATH, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t1, function Create)
call TriggerAddCondition(t2, function End)
call TriggerAddCondition(t3, function Death)
set t1 = null
set t2 = null
set t3 = null
endfunction
endlibrary
Thanks in advance!