Does this work?(is a return question)

Romek

Super Moderator
Reaction score
963
Yes, it works.
How about testing it yourself in the future? :)

Also, you can initialize locals when declaring them.
 

Romek

Super Moderator
Reaction score
963
JASS:
function Example takes nothing returns string
    local string XD = "This works right?"
    return XD
endfunction

Could even be:
JASS:
function Example takes nothing returns string
    return "This works right?"
endfunction


Or, the entire thing could be put into the whocares function. Though I think he's doing this to learn, not to make super-efficient code. :)
 

CaptDeath

New Member
Reaction score
103
cause its not to incrediably complicated all i wanted to know is if i got returns down
now i need help with takes but ill just ask wolfie on MSN
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> saves a line

To save one more:
return "this is a string"


Then again, once you're there, might as well forget the function :p
I guess though the expected problem comes from the destroyed local.
You did test this though, right?
 
General chit-chat
Help Users

      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