• 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] Funny JASS code

Status
Not open for further replies.
function Work takes everything returns nothing
Syntax error, everything is not a valid type. You need a type before it.

Is this a global or local or what?
If it is a local it is a syntax error as there is no hours difined at the start of the function.
If it is a global your loop will only work the first function call as you never set hours back to 0.

call DoNothing( )
Does nothing but an empty function call. Just delete it as it has no use in JASS.
 
JASS:
function Work takes effort everything returns nothing
    local integer hours = 0
    
    loop
        exitwhen (hours > 8 + udg_overtime)
        DisplayTextToForce(GetPlayerByName("Boss"), "Today my team has created a timeline and established our resource needs. Tomorrow we plan to revise our timeline and reestablish our resource needs.")
        set hours = hours + 1
    endloop
 
    if udg_DaysWorked = 10 then
        call Payday( )
    endif
 
    set udg_DaysWorked = udg_DaysWorked + 1
endfunction

Request fulfilled. Code is not MUI and MPI and stuff.
 
Status
Not open for further replies.
Back
Top