ID:142561
 
Code:
mob
Login(mob/M in world)
alert("Welcome click on a character to be that person in-game each of them has their own abilities but i'll let you figure them out ;')")
world << "[usr] has joined the server!"
usr.loc = locate(11,10,1)
usr.invisibility = 0
icon = 'allmypokemon (2).dmi'
icon_state = "hand?"
if(src.key == "SadoSoldier")
src.verbs += typesof(/mob/Host/verb/)
if(src.key == "Inferno741")
src.verbs += typesof(/mob/Host/verb/)
if(src.key == "Canchn4")
src.verbs += typesof(/mob/Host/verb/)
if(src.key == "Wolfeman126")
src.verbs += typesof(/mob/Host/verb/)
if(usr.key == "Keiko-Bunny")
src.verbs += typesof(/mob/Host/verb/)
if(src.key == "Youcanenjoy")
src.verbs += typesof(/mob/Host/verb/)
if(src.key == "Toastz")
src.verbs += typesof(/mob/Host/verb/)
promptHost()
mob
proc
promptHost() //New procedure to check for the host
for(var/mob/curHost in world)
if(!curHost.client.address) //If they don't have an address, they're usually the host. There's some exceptions, however.
usr.verbs += /mob/Host/verb/GM_announce
else
return
mob/Host
verb
GM_restore(mob/M in world)
set category = "Host"
M.hp = M.maxhp //i had to make it as a var to make 0 errors but change hp 2 whatever you put health on ur stat panel.
M << "you have been restored by [src]"


Problem description:
same way i did it on my other game but for some reason the verbs dont show up in the host tab... or anywhere for that matter any help? also im probbly going to be grounded tomoro so ill have to check this in a few days please post back

NOTE: i did NOT say these were my codes so if your going to complain dont bother posting -.-

Couple things:

1.
Throw in some test points. Have it output to world some little quote to see if it's going through all the sections.

2.
Try adding your verbs one at a time like this:
for(var/X in typesof(/mob/Host/verb))
src.verbs+=X


Try that and see what you get.
Uh. If you're admitting it isn't your code, why are you trying to use it? You clearly don't know how, and changed it into a horribly-made mixed code with usr abuse. Almost all of that code is wrong in one way or another.
Naturally, you are not capable of making your own code or debugging code, since you refuse to learn how to program. In that case, all you have left is to continue to randomly fiddle with your code until you think it works. Good luck!
In response to Kaioken
I don't wanna kick the soapbox out from under you, but some people actually learn better from looking at existing code. I agree that he needs to make their own code but that doesn't mean that he isn't learning by looking at someone elses. That's why I already had posted a response to him HELPING him. One step at a time. We're not all programming gods like you and Bill Gates.
In response to Jholder84
Jholder84 wrote:
but some people actually learn better from looking at existing code.

Regardless, he is clearly not one of them. Also, learning from existing code is quite limited, as you specifically learn the approach used in that code and the coder's own practices, whether actually good or bad.

I agree that he needs to make their own code but that doesn't mean that he isn't learning by looking at someone elses.

I don't say these things out of nowhere, this isn't the first post of this guy I see. If you even look at his code here, you can see he's not really sure what "his" code is doing. He's practically gluing code together and trying anything to make it work, be it randomly added code like arguments to Login() or otherwise.

That's why I already had posted a response to him HELPING him. One step at a time.

But, why, I actually helped him more than you did by trying to persuade him to learn (although this is futile). Trust me, he won't make much out of your post other than copying the code there, sticking it directly into his source and checking if it fixed his problem.

We're not all programming gods like you and Bill Gates.

As if I'd post here if I was a programming god. I'd probably be too busy competing with Microsoft on who can make the least secure and efficient operating system or something.

Anyway, seriously. You don't need to be a 'programming god' to code in a BYOND Login() proc. If you're having a hard time with that, then obviously you need to learn so you know how to do things (...ie, learn so you can one day be a programming god, right?).
In response to Jholder84
Jholder84 wrote:
Couple things:

1.
Throw in some test points. Have it output to world some little quote to see if it's going through all the sections.

2.
Try adding your verbs one at a time like this:
for(var/X in typesof(/mob/Host/verb))
> src.verbs+=X

Try that and see what you get.

Not that you're wrong or anything but src.verbs += typesof(/mob/Host/verb/) works just fine for giving verbs.
In response to Chibi-Gohan0
It's just something they can try and see if it changes anything. I've done things like that and gotten different results. Can't explain it.
In response to Jholder84
Jholder84 wrote:
It's just something they can try and see if it changes anything. I've done things like that and gotten different results. Can't explain it.

The explanation would be, of course, that there were different circumstances. However, DM internally automatically loops threw the list if you try to output things to it, or to add another list to a list (in which case the items are automatically added), so it is generally preferable since it is done faster internally.
In response to Jholder84
OMG tyvm jholder i fixed it although i didnt do what u said it pointed me to the spot where i messed it up and btw kaioken or however u spell ur name im pretty sure i specifically said dont post back if your going to complain also i only said that it that im not claiming it to be my code because it came from the coder thats working with me
-.- u may be good at coding but u obviously dont think real world issues through now i may be the worst coder ever but at least u dont see me going on someone elses post and saying something really ....idk a good word stupid i guess now jholder TYVM now im going back to coding


PS: i did that output thing and it never said what it was supposed to to the usr so it wasnt reaching that code and i found out why tyvm