heres my code:
mob/gm/verb
Erase()
new /turf(src.loc)
Yell(msg as text)
world << "[usr] says, '[msg]'."
Ghost()
usr << "Your a ghost!"
density = 0
Rock()
usr << "Your as hard as a rock!"
density = 1
mob/create_character
var/mob/character
Login()
if(src.key == "Redslash")
var/mob/character
switch(input("What char Sire?")in list("Geomancer","FighterMage","Troop"))
if("Geomancer")
character = new /mob/RSsGeomancer(locate(/area/start))
world << "Redslash has joined!"
if("FighterMage")
character = new /mob/RSsFighterMage(locate(/area/start))
world << "Redslash has joined!"
if("Troop")
character = new /mob/RSsTroop(locate(/area/start))
world << "Redslash has joined!"
usr.verbs+=/mob/gm/verb/Yell
src.client.mob = character
del(src)
..()
the verb "Yell" isn't showing up, please help, thank you!
ID:178415
May 15 2002, 3:49 pm
|
|
In response to EvilGotenks
|
|
loading FFChat.dme
Login.dm:16:/mob/gm/verb/Yell:warning: use call() to call a proc by reference loading Town.dmp saving FFChat.dmb FFChat.dmb - 0 errors, 1 warning (double-click on an error to jump to it) ^Is what it gave me when i compiled it... |
In response to Redslash
|
|
I am pritty sure were doing was right but you have to add new to the back of the usr.verbs+=new/
|
Redslash wrote:
heres my code: Why it doesn't work. Well why it isn't because with del(src) you are deleting the old mob. Which means what ever was added to your verbs list with src, usr, or whatever is not there. So change usr.verbs+=/mob/verb/gm/Yell . Use this approach character.verbs.Add(/mob/verb/gm/Yell) . So character's verbs has Yell and so when you shange your client.mob to character you have the verb:) |
Even though it's supposedly safe to put usr in Login(), you should always use src there anyway.
I think one (or both) of two things could be affecting your verb: Add it to client.verbs instead of src.verbs, and use the line "set src=usr" in the verb. And please learn to spell "you're". Your = belonging to you You're = contraction of "you are" Lummox JR |
here is how you can fix that, I think
usr.verbs+=/mob/gm/verb/Yell()
if that don't work then I don't know what to tell ya