• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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