• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[JASS] Converting from GUI to JASS not working

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
460
Hi. I'm fairly new to Jass, and im trying to make a simple minigame type map and I'm unfamiliar with all the function translations and such, so i make them in GUI, and convert to custom text, and try to make it fit into my functions. But i script checked the conversion, and it had syntax errors. How is this possible? I think in the GUI i fixed all the leaks, and then i convert and its leaking in Jass. I don't understand. Please do note. I'm just now trying to learn Jass with a headon approach. If you think there is a tutorial that would benefit me, please by all means post it.

  • BeginGUI
    • Events
    • Conditions
    • Actions
      • Set temp_Loc = (Center of (Playable map area))
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Wisp for (Picked player) at temp_Loc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_tempLoc)
JASS:
function Trig_BeginGUI_Func002A takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'ewsp', GetEnumPlayer(), udg_temp_Loc, bj_UNIT_FACING )
endfunction

function Trig_BeginGUI_Actions takes nothing returns nothing
    set udg_temp_Loc = GetRectCenter(GetPlayableMapRect())
    call ForForce( udg_Players, function Trig_BeginGUI_Func002A )
    call RemoveLocation(udg_tempLoc)
endfunction

//===========================================================================
function InitTrig_BeginGUI takes nothing returns nothing
    set gg_trg_BeginGUI = CreateTrigger(  )
    call TriggerAddAction( gg_trg_BeginGUI, function Trig_BeginGUI_Actions )
endfunction
 
Level 9
Joined
Apr 23, 2011
Messages
460
So like this?
JASS:
function Trig_gfg_Func002A takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'ewsp', GetEnumPlayer(), udg_temp_Loc, bj_UNIT_FACING )
endfunction
globals
      temp_Loc = GetRectCenter(GetPlayableMapRect())
      Players = GetPlayersAll()
endglobals
function Trig_gfg_Actions takes nothing returns nothing
    set udg_temp_Loc = GetRectCenter(GetPlayableMapRect())
    call ForForce( udg_Players, function Trig_gfg_Func002A )
    call RemoveLocation(udg_temp_Loc)
endfunction

//===========================================================================
function InitTrig_gfg takes nothing returns nothing
    set gg_trg_gfg = CreateTrigger(  )
    call TriggerAddAction( gg_trg_gfg, function Trig_gfg_Actions )
endfunction
 
Status
Not open for further replies.
Top