• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Can any1 help me with this JASS Script?

Status
Not open for further replies.
Level 10
Joined
Jan 24, 2009
Messages
606
Hello... I am trying out the beggining JASS torturial and i made Everything in it but I get 1 error with it:

JASS:
function Function2 takes nothing returns string
    local string message = SomeFunction("Hello World")
 return message
endfunction

The error is on the Second line of the Function and it says:
Cannot convert nothing into string.... I woud love to get some help here:)

I will give you +rep if u help me:)
 
Hello... I am trying out the beggining JASS torturial and i made Everything in it but I get 1 error with it:

JASS:
function Function2 takes nothing returns string
    local string message = SomeFunction("Hello World")
 return message
endfunction

The error is on the Second line of the Function and it says:
Cannot convert nothing into string.... I woud love to get some help here:)

I will give you +rep if u help me:)

remove the SomeFunction and the parentheses........

JASS:
function Function2 takes nothing returns string
    local string message = "Hello World"
 return message
endfunction

but I think you can just make it return "Hello World" though I'm unsure....
 
Level 11
Joined
Apr 29, 2007
Messages
826
remove the SomeFunction and the parentheses........

JASS:
function Function2 takes nothing returns string
    local string message = "Hello World"
 return message
endfunction

but I think you can just make it return "Hello World" though I'm unsure....

Yes, you can simply do this:
JASS:
function Function2 takes nothing returns string
    return "Hello World"
endfunction
 
Status
Not open for further replies.
Top