LearningCode
New Member
- Reaction score
- 24
Okay, I'm getting this error message when trying to save:
Bad types for Binary operator
The 2 lines that have that exact error message are:
Am I doing something wrong? o.0
Bad types for Binary operator
JASS:
scope ZeppelinBomber initializer ZBCast
globals
private constant integer MAXPlayers = 1 //This is the number of players in the map that have access to your hero
private constant integer ZBID = 039;A000039; //The raw-code of your Zeppelin Spell
private constant integer ZeppelinDummyID = 039;h000039; //The raw-code of your Zeppelin Dummy unit
private constant integer BombDummyID = 039;h001039; //The raw-code of your Bomb caster
private constant integer BombID = 039;A001039; //The raw-code of your Dummy Bomb Spell
private constant real DistanceGap = 200.00 //Distance Between Bombs
private constant real BlastRadius = 200.00 //Damage radius
private constant real KnockBack = 200.00 //KnockBack Distance
endglobals
private struct ZB
unit caster
real casterX
real casterY
integer ZeppelinLevel
unit Zeppelin
unit Bomb
real ZepX
real ZepY
real radian
timer Timing
integer ticks
integer tickingNow
real TargX
real TargY
private method periodic takes nothing returns nothing
local ZB zb = this
if zb.tickingNow < zb.ticks then
if (ModuloInteger(zb.tickingNow, 2) == 0 or zb.tickingNow == 0) and zb.tickingNow >= 18 then
set zb.Bomb = CreateUnit(GetOwningPlayer(zb.caster), BombDummyID, zb.ZepX, zb.ZepY, zb.radian)
call UnitAddAbility(zb.Bomb, BombID)
call IssuePointOrder(zb.Bomb, "clusterrockets", zb.ZepX, zb.ZepY)
call UnitApplyTimedLife(zb.Bomb, 039;BTLF039;, 1.00)
set zb.Bomb = null
endif
set zb.ZepX = zb.caster + (DistanceGap/6) * Cos(zb.radian)
set zb.ZepY = zb.caster + (DistanceGap/6) * Sin(zb.radian)
endif
endmethod
implement T32x
static method ZBAct takes nothing returns nothing
local ZB zb = ZB.allocate()
set zb.caster = GetTriggerUnit()
set zb.TargX = GetSpellTargetX()
set zb.TargY = GetSpellTargetY()
set zb.casterX = GetUnitX(zb.caster)
set zb.casterY = GetUnitY(zb.caster)
set zb.ZeppelinLevel = GetUnitAbilityLevel(zb.caster, ZBID)
set zb.radian = GetUnitFacing(zb.caster) * bj_DEGTORAD
if zb.ZeppelinLevel == 1 then
set zb.ticks = 10
elseif zb.ZeppelinLevel == 2 then
set zb.ticks = 14
else
set zb.ticks = 20
endif
set zb.ZepX = zb.casterX - (DistanceGap*3) * Cos(zb.radian)
set zb.ZepY = zb.casterY - (DistanceGap*3) * Sin(zb.radian)
set zb.Zeppelin = CreateUnit(GetOwningPlayer(zb.caster), ZeppelinDummyID, zb.ZepX, zb.ZepY, zb.radian)
call zb.startPeriodic()
endmethod
endstruct
private function ZBCond takes nothing returns boolean
return GetSpellAbilityId() == ZBID
endfunction
private function ZBCast takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > (MAXPlayers - 1)
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set i = i+1
endloop
call TriggerAddCondition(t, Condition(function ZBCond))
call TriggerAddAction(t, function ZB.ZBAct)
endfunction
endscope
The 2 lines that have that exact error message are:
JASS:
Am I doing something wrong? o.0