Problem occuring when testing map.

simonake

New Member
Reaction score
72
When I click ctrl+F9, the map doesn't start, warcraftIII does and send me to main page.
I use NewGen.
Here's my spell code.

JASS:
scope Blink_strike initializer init
globals
//Editables constans
 private constant string MDL = "Abilities\\Spells\\Human\\Slow\\SlowCaster.mdl"
 private constant integer SPELL_ID = 'A000' //Spell id
 private constant attacktype ATK = ATTACK_TYPE_HERO
 private constant damagetype DTP = DAMAGE_TYPE_NORMAL
 private constant weapontype WTP = WEAPON_TYPE_WHOKNOWS
endglobals

function C takes nothing returns boolean
 return GetSpellAbilityId() == SPELL_ID
endfunction

function A takes nothing returns nothing
    local unit t = GetSpellAbilityUnit()
    local unit c = GetTriggerUnit()
    local real x = GetUnitX( t)
    local real y = GetUnitY( t)
    local integer i = GetUnitAbilityLevel( c, SPELL_ID)
    local real dmg = 100 * I2R( i)

    call SetUnitX( c, x)
    call SetUnitY( c, y)
    call AddSpecialEffect( MDL' x, y)
    call UnitDamageTarget( c, t, dmg, true, false, ATK, DTP, WTP)
 set t = null
 set c = null
endfunction

//===========================================================================
function InitTrig_Myspell takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function C))
    call TriggerAddAction( t, function A )
endfunction

endscope
 

_whelp

New Member
Reaction score
54
You save it first if you see an asterisk(*) on your NewGen window, and your constants, you need \\, not just \, otherwise it wouldn't function correctly.

Also, your Initialization function has to be called init, as you set in your scope...
 

_whelp

New Member
Reaction score
54
Change the \'s to \\.
Rename your InitTrig_Myspell function to init.
Errmmm... save the map first. Sorry if you couldn't understand.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You have to save the map then test right afterwards.
If you move stuff around or do anything it has to (You have to) recompile (Save again) .
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Please save the map before pressing test map button.
Script : Your Init is wrong. You should put the InitTrig_.... to Init!!
 

saw792

Is known to say things. That is all.
Reaction score
280
Oh, and your scope name can't have underscores.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top