• 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.

[Solved] Two errors when trying to save a map

Status
Not open for further replies.
Level 4
Joined
Nov 6, 2008
Messages
77
I'm currently working making an edited version of the RoC stage "the culling" But every time I try to save the map I'm given two errors with the following trigger
Line 415: Unexpected return in 'returns nothing' function
Line 418: Expected 'endloop'

Even weirder, I'm not sure I ever had this problem on my old computer. Anyway, some help fixing this would be greatly appreciated since I know next to nothing about JASS triggers. Thanks in advance!

JASS:
//===========================================================================
function Trig_Malganis_Booting_Player_Actions takes nothing returns nothing

    if IsUnitDeadBJ(udg_MalganisVariable) then
        return false
    endif

    loop
        exitwhen udg_MaySendCommands 
        call TriggerSleepAction( 0.1 )
    endloop
    set udg_MaySendCommands = false
    call StartTimerBJ( udg_TimerMaySendCommands, false, 1.00 )

    set udg_BootingPlayer = true

    call CommandAI( Player(6), 4, 1 )
    call EnableTrigger( gg_trg_Das_Boot_to_Arthas )
endfunction

//===========================================================================
function InitTrig_Malganis_Booting_Player takes nothing returns nothing
    set gg_trg_Malganis_Booting_Player = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Malganis_Booting_Player, function Trig_Malganis_Booting_Player_Actions )
endfunction
 
Last edited by a moderator:
Change "return false" to "return"

Hopefully that will fix the error. I'm guessing you're using JassNewGenPack? It was updated after 1.24 (return bug fix) so that it would throw an error when the return type doesn't match the function's signature. But that is inconsistent with the normal syntax checker in the case shown above (that will run just fine in wc3, but JNGP's syntax checker will give you a syntax error).
 
Status
Not open for further replies.
Top