• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] A Little Help Here

Status
Not open for further replies.
JASS:
function Trig_jass_Actions takes nothing returns nothing
    CreateUnitAtLoc( Player(0) , ABOMINATION , GetRectCenter(GetPlayableMapRect()) , 0.00 )
endfunction

//===========================================================================
function InitTrig_jass takes nothing returns nothing
    set gg_trg_jass = CreateTrigger(  )
    call TriggerRegisterPlayerEvent( gg_trg_jass,Player(0),EndCinematicScene)
    call TriggerAddAction( gg_trg_jass, function Trig_jass_Actions )
endfunction

Every time I save the map I get errors, whats wrong with the codes ?
 
in your function "Trig_jass_Actions" it appears you want to call the CreateUnitAtLoc function, but you forgot to use "call"

change line 2 to:
JASS:
call CreateUnitAtLoc( Player(0) , ABOMINATION , GetRectCenter(GetPlayableMapRect()) , 0.00 )
 
Ok. I changed the script to:

JASS:
function Trig_jass_Actions takes nothing returns nothing
    call CreateUnit( Player(0) , 'uabo' , 0.00 , 0.00 , 0.00 )
endfunction

//===========================================================================
function InitTrig_jass takes nothing returns nothing
    set gg_trg_jass = CreateTrigger(  )
    call TriggerRegisterPlayerEvent( gg_trg_jass , Player(0) , EndCinematicScene())
    call TriggerAddAction( gg_trg_jass, function Trig_jass_Actions() )
endfunction

But I still get error in the line:

JASS:
call TriggerAddAction( gg_trg_jass, function Trig_jass_Actions() )

The error: Invalid argument type (void)
 
Get rid of those parenthesis, when a parameter for a function is code(another function) you don't use parenthesis.. I'm not good at explaining what I'm trying to say i guess, so I'll just show you:

Change
JASS:
call TriggerAddAction( gg_trg_jass, function Trig_jass_Actions() )

to:
JASS:
call TriggerAddAction( gg_trg_jass, function Trig_jass_Actions)
 
Many times the syntax check will say the error is in one line, while it's actually in the next. Your problem is in your Event Registration. EndCinematicScene() is not an event..

change:
JASS:
call TriggerRegisterPlayerEvent( gg_trg_jass , Player(0) , EndCinematicScene())
to:
JASS:
call TriggerRegisterPlayerEvent( gg_trg_jass , Player(0) , EVENT_PLAYER_END_CINEMATIC)
 
Status
Not open for further replies.
Back
Top