WarLuvr3393
Hmmm...too many things to play (WoW, COD4, WC3)
- Reaction score
- 54
Here's the script that I'm working on:
And this is the error that comes up:
This is the unit declaration for Player(0):
As you can see, they are properly declared however it still gives me the error that they're undeclared.
Any ideas?
JASS:
function one takes nothing returns nothing
local group g= CreateGroup()
local unit array s
local integer i= 1
local destructable d= gg_dest_DTfx_0249
set s[1]=gg_unit_ncop_160
set s[2]=gg_unit_ncop_162
set s[3]=gg_unit_ncop_163
set g = GetUnitsInRectAll(gg_rct_Foot_1)
if CountUnitsInGroup(g) == 0 then
call DestructableRestoreLife(d , 100.0 , true)
loop
exitwhen i > 3
if GetOwningPlayer(s<i>) == Player(0) then
call SetUnitOwner(s<i> , Player(5) , true)
else
call SetUnitOwner(s<i> , Player(0) , true)
endif
set i = i + 1
endloop
else
call KillDestructable(d)
loop
exitwhen i > 3
if GetOwningPlayer(s<i>) == Player(5) then
call SetUnitOwner(s<i> , Player(0) , true)
else
call SetUnitOwner(s<i> , Player(5) , true)
endif
set i = i + 1
endloop
endif
call DestroyGroup(g)
set g = null
endfunction
function two takes nothing returns nothing
endfunction
function three takes nothing returns nothing
endfunction
function four takes nothing returns nothing
endfunction
//===========================================================================
function Init takes nothing returns nothing
local integer i= 0
loop
exitwhen i > 4
set switch<i>=CreateTrigger()
call TriggerRegisterTimerEvent(switch<i> , 0.03 , true)
set i = i + 1
endloop
call TriggerAddAction(switch[1] , function one)
call TriggerAddAction(switch[2] , function two)
call TriggerAddAction(switch[3] , function three)
call TriggerAddAction(switch[4] , function four)
endfunction</i></i></i></i></i></i></i></i>
And this is the error that comes up:
This is the unit declaration for Player(0):
JASS:
function CreateBuildingsForPlayer0 takes nothing returns nothing
local player p= Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit(p , 039;ncop039; , - 2560.0 , 512.0 , 270.000)
set gg_unit_ncop_0160 = CreateUnit(p , 039;ncop039; , - 2560.0 , 640.0 , 270.000)
set u = CreateUnit(p , 039;ncop039; , - 2560.0 , 768.0 , 270.000)
set gg_unit_ncop_0162 = CreateUnit(p , 039;ncop039; , - 2560.0 , 896.0 , 270.000)
set gg_unit_ncop_0163 = CreateUnit(p , 039;ncop039; , - 2560.0 , 1024.0 , 270.000)
set u = CreateUnit(p , 039;ncop039; , - 2560.0 , 1152.0 , 270.000)
set u = CreateUnit(p , 039;ncop039; , - 2560.0 , 1280.0 , 270.000)
endfunction
As you can see, they are properly declared however it still gives me the error that they're undeclared.
Any ideas?