[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