ID:179217
 
How do you talk where everyone in the game can hear you?
I just need the script thanks
mob/verb/Shout(T as text)
world<<"[src.name]: [html_encode(T)]"
In response to Super16
When I complie it says
Menu.dm:5: Inconsistent indentation.
I'm making it as a comand in a menu
In response to Chrishero
Then correctly indent it try tabing it forward or back more

and if that doesnt work try tabing everyting (in this code) back one
In response to Hgame9
Now i get this
Menu.dm:4:error:T:undefined var
Menu.dm:5:error:T:undefined var
Menu.dm:4:error::extra argument
Menu.dm:4:text "Speak":warning: statement has no effect
Menu.dm:4:mob :warning: unused label
Menu.dm:4:verb :warning: unused label
In response to Chrishero
Chrishero wrote:
When I complie it says
Menu.dm:5: Inconsistent indentation.
I'm making it as a comand in a menu

Yes, because you cant copy paste it.

Alathon
In response to Super16
Ok Now I get this

Menu.dm:5: unterminated text (expecting ")

Quest Of The Dragon.dmb - 3 errors, 0 warnings (double-click on an error to jump to it)
In response to Chrishero
NOW I ONLY GET THIS

Menu.dm:5:error: missing left-hand argument to >>.
In response to Chrishero
ERr post your menu
In response to Super16
mob
Stat()
statpanel("Comands",src.contents)
mob/verb/Shout("T" as text)
<<world<<"[src.name]":[html_encode"T"]
statpanel("Stats")
stat("Name:",src.name)
stat("Intelligence",src.density)



AND ALSO I'M HAVING TROUBLE WITH A LOGIN SCRIPT HERE IT IS

mob/Login()
usr.name = input("What is your name?") as text // text prompt
usr.gender = input("What is your Class/Gender?") in list("Hero (Male)","Hero (Female)")

if (usr.gender == "Hero (Male)") icon = 'Hero Male.DMI'
else if (usr.gender == "Hero (Female)") icon = 'Hero Female.DMI'
else icon = 'Black.DMI'

return ..()

And when I go into the dream maker and i click it says

runtime error: bad gender
proc name: Login (/mob/Login)
usr: (/mob)
src: (/mob)
call stack:
(/mob): Login()


I ALSO HAVE A FEW MORE THINGS BUT LETS JUST SOOLVE THESE FIRST OK?


In response to Chrishero
1) You're trying to define a verb within a proc, which won't work, you have to define the verb in it's own space.

mob/verb/speak(T as text)
world<<"[usr]: [html_encode(T)]"
//Don't copy paste this!


2) You can only set the built in gender var to three things "male", "female", and "neuter", anything else will give you an error.
In response to Nadrew
But then how do I put speak into the script if its in another?
In response to Chrishero
It doesn't matter where it is, except being in a code file, and being indented properly.
In response to Nadrew
try this out!!!

go up to File
New
Codefile
name it verbs


then put this in there!


mob/verb/say(msg as text)
sleep(4123412341243234)
world << "[usr]:[msg]"
In response to Nadrew
Nadrew wrote:
1) You're trying to define a verb within a proc, which won't work, you have to define the verb in it's own space.

> mob/verb/speak(T as text)
> world<<"[usr]: [html_encode(T)]"
> //Don't copy paste this!
>

2) You can only set the built in gender var to three things "male", "female", and "neuter", anything else will give you an error.

Something I did is create my own gender variable.

make under mob
var cgender // Character's Gemder

LJR