Problem with convert

Sk8-tEr

New Member
Reaction score
5
I converted this to JASS

Code:
Convert Copy Copy
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Polymorph
    Actions
        Unit - Set (Casting unit) movement speed to 50.00

It converts to this exactly

JASS:
function Trig_Convert_Copy_Copy_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'Aply' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Convert_Copy_Copy_Actions takes nothing returns nothing
    call SetUnitMoveSpeed( GetSpellAbilityUnit(), 50.00 )
endfunction

//===========================================================================
function InitTrig_Convert_Copy_Copy takes nothing returns nothing
    set gg_trg_Convert_Copy_Copy = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Convert_Copy_Copy, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Convert_Copy_Copy, Condition( function Trig_Convert_Copy_Copy_Conditions ) )
    call TriggerAddAction( gg_trg_Convert_Copy_Copy, function Trig_Convert_Copy_Copy_Actions )
endfunction


I did Syntax check and it says there is a problem with line 14

JASS:
   set gg_trg_Convert_Copy_Copy = CreateTrigger(  )


I did nothing to the JASS script but the conversion doesn't work ???

Edit: Btw this has nothing to do with my JASS skills or reading tutorials I think...
 

Sk8-tEr

New Member
Reaction score
5
Thanks it worked

I also tried another conversion from GUI to JASS and there was also
a syntax problem though... some1 recommended to learn JASS
i should convert gui to jass but the conversions have at least 1
error always!
 
Reaction score
341
JASS:
gg_trg_Convert_Copy_Copy


are supposed to be global variables, try saving before converting a gui trigger (Using local trigger t is a better way)
 

Sk8-tEr

New Member
Reaction score
5
THANKS again!!!
Changing it to
JASS:

then filling in the variable for each time it shows the gg_trg works
and theres no syntax error for all the conversions I checked!
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> I did nothing to the JASS script but the conversion doesn't work?

The conversion works just fine.
What doesn't really work is the "check syntax" button TESH provides...
Use "save" instead.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top