Page 1 of 1

Easy question ! English

Posted: 2006-02-16 14:02:45
by -=SaCi=-
i´m a sphere scripter, and in sphere we have a key to stop the comand, that's
return 1

Example!
if uo.getGlobal("Modobatalha") == "0" then
UO.SetGlobal("Falando",UO.GetGlobal("Falando")+"p")
# here i need to but the key to stop de macro, to it doesn't go to the other part
endif
uo.say("Calminha")

I can do this way to:

if uo.getGlobal("Modobatalha") == "1" then
UO.SetGlobal("Falando",UO.GetGlobal("Falando")+"p")
else
uo.say("Calminha")
end if

I kown!

But i want to know that comand, some one here can tell me ?
tks

Posted: 2006-02-16 16:44:54
by Destruction
return - this command return value from frunction to function that calls the function, if function that calls the function not exists, then macro will stopped.

e.g.

Code: Select all

sub MySub()
var a = MyOtherSub() ; run function
return ; end macro
endsub

sub MyOtherSub()
return true ; return true to function that calls the function
endsub


Sorry for my very clumsy English;

Posted: 2006-02-16 18:03:09
by -=SaCi=-
tks Destruction
was this that i wanted to know