• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

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