• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

World Editor problem !

Status
Not open for further replies.
Level 2
Joined
Feb 15, 2009
Messages
12
Yesterday i was learning how to make the "knockback" system and i made a test map and started doing the tutorial...Then in the end of the tutorial there was that line -->call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)<-- Then the spell didn't work..So i made a pause for few hours..Then i made few maps which were different..they were not the knockback system...even when the map doesn't have triggers variables or something else it gives mi that error..and i suddenly realized that every time i click on the "save map" button it shows me error !! Here's ony one part of the error :eekani: !

function Trig_Knockback_Actions takes nothing returns nothing
set udg_Caster = GetTriggerUnit()
set udg_Target = GetSpellTargetUnit()
set udg_Distance = ( 400 + ( 100 * GetUnitAbilityLevelSwapped('A000', udg_Caster) ) )
set udg_Angle = GetUnitLoc(udg_Caster)
set udg_Duration = 2
call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)

And that the last line is in black.
 
Level 2
Joined
Feb 15, 2009
Messages
12
Please tell us what errors you got from the compiler.

What tutorial were you following.

Did you even create the knockback system?

This is the link for the knockback tutorial(!Click!)
...And i was doing the last one which is GUI because i'm not good at JASS.

Yes,i finished the tutorial and it's ok and it is working,but it still gives me that error...I really don't have idea why...I've changed the world editor options.I mean Preferences->Allow negative real negative values in Object Editor and Automatically create unknown variables while pasting trigger data. but i dont think that this is the problem.I tried to make new maps..without any changes just new map and when i click save it gives me error..
 
Level 2
Joined
Feb 15, 2009
Messages
12
How are you going to use a system if its not there...

Just download the system and implement it into your map.
But look..my trigger doesn't look like this in the tutorial..I just tried to do it but it didn't work.Now my trigger looks like this
  • Knocback Call
    • Events
    • Conditions
    • Actions
      • Set KnockbackSys_Index = (KnockbackSys_Index + 1)
      • Set KnockbackSys_Unit[KnockbackSys_Index] = KnockbackCall_Unit
      • Set KnockbackSys_Dist[KnockbackSys_Index] = KnockbackCall_Dist
      • Set KnockbackSys_Angle[KnockbackSys_Index] = KnockbackCall_Angle
      • Set KnockbackSys_SFXPath[KnockbackSys_Index] = KnockbackCall_SFX
      • Set KnockbackSys_TickCount[KnockbackSys_Index] = (Integer((KnockbackCall_Dur / 0.04)))
      • Set KnockbackSys_Tick[KnockbackSys_Index] = 0
      • Set KnockbackSys_Sin[KnockbackSys_Index] = (90.00 / (Real(KnockbackSys_TickCount[KnockbackSys_Index])))
      • Set KnockbackSys_DestroyTree[KnockbackSys_Index] = KnockbackCall_DestroyTree

  • Knocback Execute
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer KnockbackSys_Looper) from 1 to KnockbackSys_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockbackSys_Tick[KnockbackSys_Looper] Greater than KnockbackSys_TickCount[KnockbackSys_Looper]
            • Then - Actions
              • Set KnockbackSys_Index = (KnockbackSys_Index - 1)
              • For each (Integer A) from KnockbackSys_Looper to KnockbackSys_Index, do (Actions)
                • Loop - Actions
                  • Set TempInt = (Integer A)
                  • Set KnockbackSys_Unit[TempInt] = KnockbackSys_Unit[(TempInt + 1)]
                  • Set KnockbackSys_Dist[TempInt] = KnockbackSys_Dist[(TempInt + 1)]
                  • Set KnockbackSys_Angle[TempInt] = KnockbackSys_Angle[(TempInt + 1)]
                  • Set KnockbackSys_SFXPath[TempInt] = KnockbackSys_SFXPath[(TempInt + 1)]
                  • Set KnockbackSys_TickCount[TempInt] = KnockbackSys_TickCount[(TempInt + 1)]
                  • Set KnockbackSys_Tick[TempInt] = KnockbackSys_Tick[(TempInt + 1)]
                  • Set KnockbackSys_Sin[TempInt] = KnockbackSys_Sin[(TempInt + 1)]
                  • Set KnockbackSys_DestroyTree[TempInt] = KnockbackSys_DestroyTree[(TempInt + 1)]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockbackSys_Tick[KnockbackSys_Looper] Less than or equal to KnockbackSys_TickCount[KnockbackSys_Looper]
            • Then - Actions
              • Set KnockbackSys_Tick[KnockbackSys_Looper] = (KnockbackSys_Tick[KnockbackSys_Looper] + 1)
              • Set TempReal = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real((KnockbackSys_Tick[KnockbackSys_Looper] - 1)))))))
              • Set TempReal2 = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real(KnockbackSys_Tick[KnockbackSys_Looper]))))))
              • Set TempLoc = (Position of KnockbackSys_Unit[KnockbackSys_Looper])
              • Set TempLoc2 = (TempLoc offset by (TempReal2 - TempReal) towards KnockbackSys_Angle[KnockbackSys_Looper] degrees)
              • Unit - Move KnockbackSys_Unit[KnockbackSys_Looper] instantly to TempLoc2
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KnockbackSys_DestroyTree[KnockbackSys_Looper] Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within 200.00 of TempLoc2 and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KnockbackSys_SFXPath[KnockbackSys_Looper] Not equal to <Empty String>
                • Then - Actions
                  • Special Effect - Create a special effect at TempLoc2 using KnockbackSys_SFXPath[KnockbackSys_Looper]
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • Custom script: call RemoveLocation( udg_TempLoc )
              • Custom script: call RemoveLocation( udg_TempLoc2 )
            • Else - Actions
  • Knockback
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Storm Hammers for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 100) Less than or equal to 20
    • Actions
      • Set TempUnit = (Attacking unit)
      • Set TempUnit2 = (Attacked unit)
      • Set TempLoc = (Position of TempUnit)
      • Set TempLoc2 = (Position of TempUnit2)
      • Animation - Play TempUnit's Attack Slam animation
      • Unit - Cause TempUnit to damage TempUnit2, dealing 50.00 damage of attack type Chaos and damage type Force
      • -------- call knockback --------
      • Set KnockbackCall_Unit = TempUnit2
      • Set KnockbackCall_Dur = 1.00
      • Set KnockbackCall_Dist = 300.00
      • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
      • Set KnockbackCall_SFX = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
      • Set KnockbackCall_DestroyTree = True
      • Trigger - Run Knocback Call <gen> (ignoring conditions)
      • -------- --- done --- --------
      • Custom script: call RemoveLocation( udg_TempLoc )
      • Custom script: call RemoveLocation( udg_TempLoc2 )

The last one is the spell and everything works...But it gives me error that doesn't exist at line 67.

This is the error which was on the first tutorial
  • Custom script: call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)
 
Level 2
Joined
Feb 15, 2009
Messages
12
Because the function Knockback doesn't exist..and it's included in the system.

If you are going to refuse to listen, I will refuse to help.
Yes,sir.But i don't understand what you want to tell me.What should i do? What do i have to copy,where? Sorry for that but i started map editing 2 weeks ago and i am still bad at it :confused:
 
Status
Not open for further replies.
Top