HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Divide by zero?

04-15-2007, 08:00 AM#1
Devouring-One
I'm trying to use "DamagingProjectileLaunchTargetLoc" but WC keeps fetching a "Divide by zero error" from the function "UnitMoveToAsProjectileGen". I know not what I am doing wrong, I also know that I have (probably) not provided enough information with my trigger below, but I don't know what else you might need to help diagnose and solve this problem.

It seems so simple, I don't know where the problem could be originating from.

Your assistance would be greatly appreciated,
~Devouring-One

JASS

Collapse TowerBolt:
function InitTrig_TowerBolt takes nothing returns nothing
    call OnAbilityEffect('A000',"TowerBolt_Actions")
endfunction

//===========================================================================
function TowerBolt_Actions takes nothing returns nothing
 local unit     u      = GetTriggerUnit()
 local unit     target = GetSpellTargetUnit()
 local location loc    = GetUnitLoc(u)
 local real     x

 call DamagingProjectileLaunchTargetLoc(u, "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl", 500, 0.0, loc, 100.0, target, 100.0, 200, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_MAGIC )
 call RemoveLocation(loc)
 set loc=null
 set target=null
 set u=null
endfunction

04-15-2007, 10:38 AM#2
Captain Griffen
Should it be GetTargetLoc(target)?

You seem to be firing it at the caster, which will result in a divide by 0 (dy/dx).
04-16-2007, 12:37 AM#3
1337D00D
(Off Topic)

divide by 0 = infinity
04-16-2007, 01:04 PM#4
Toadcop
Quote:
divide by 0 = infinity
in war3 universe it's == Crushed thread =)
04-16-2007, 01:38 PM#5
Vexorian
Quote:
Originally Posted by 1337D00D
(Off Topic)

divide by 0 = infinity
in real life x/0 -> infinity , not really equals infinity. Let me close this thread, the problem is fixed and it turned out it was something very special about the way he implemented things.