I wanted to make a Infinite ammo THOR
But The tracelog was saying
WARNING: Taking Item From An Empty Stack
GETALLUNITSINRANGE at line 5
QuoteShowTraceLog
do (GetAllUnitsInRange(0 0 9999) 0)
->unit
if (GetUnitType(<-unit) eq("THOR"))
<-count add(1) ->count
<-unit trace
endif
<-unit CONST_MAXAMMO GetUnitAttribute ->YEE
<-unit CONST_AMMO <-YEE SetUnitAttribute
loop
GetAllUnitsInRange has a fourth parameter.
Quote from: piggood on May 22, 2019, 05:09:12 AM
do (GetAllUnitsInRange(0 0 9999 0) 0)
->unit
if (GetUnitType(<-unit) eq("THOR"))
<-count add(1) ->count
<-unit trace
endif
<-unit CONST_MAXAMMO GetUnitAttribute ->YEE
<-unit CONST_AMMO <-YEE SetUnitAttribute
loop