• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Is this JASS script written correctly?

Status
Not open for further replies.
Level 1
Joined
Jul 12, 2005
Messages
5
I was just wondering if this JASS script is written correctly because when i save the map, it says that there is an error and it wont enable the trigger.


JASS:
function Trig_Summon_Rifle_Conditions takes nothing returns boolean
    if ( not ( GetResearched() == 'R007' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Summon_Rifle_Actions takes nothing returns nothing
    call EnableTrigger( gg_trg_Bring_Rifle )
endfunction

//===========================================================================
function InitTrig_Summon_Rifle takes nothing returns nothing
    set gg_trg_Summon_Rifle = CreateTrigger(  )
    call TriggerRegisterUnitEvent( gg_trg_Summon_Rifle, gg_unit_hbla_0023, EVENT_UNIT_RESEARCH_FINISH )
    call TriggerAddCondition( gg_trg_Summon_Rifle, Condition( function Trig_Summon_Rifle_Conditions ) )
    call TriggerAddAction( gg_trg_Summon_Rifle, function Trig_Summon_Rifle_Actions )
endfunction



Thankyou


numb[/code]
 
Status
Not open for further replies.
Top