ID:147791
 
world
view = 7
name = "Ludo"
hub = "DiZzyBonne.Ludo"
mob = /mob/Player


is my world code, and

mob
proc
addgm()
if(src.key == "DiZzyBonne")
src.gm = 1
src.world.mob = /mob/GM
for(var/gm in typesof(/mob/GM/verb))
src.verbs += gm


is my GM code. src.world.mob = /mob/GM is the problem. I mean, I still get the GM commands, but so does everybody else, AND I'm only considered a /mob/Player, while everybody else that logs in is a /mob/GM. Can anybody please help me?

thanx
mob
proc
addgm()
if(src.key == "DiZzyBonne")
src.gm = 1
src.world.mob = /mob/GM
for(var/gm in typesof(/mob/GM/verb))
src.verbs += gm
else
..()
In response to Branks
That doesn't fix the problem.
Again we run into the problem of people using a line of coding without the first clue what it does.



src.world.mob = /mob/GM

I'm surprised "src.world.mob" works... didn't realize that src had a world var... but anyway... everybody in the game has the -same- world, so the var you're changing has nothing to do with the mob using the verb, it's changing the var for everybody.

And what exactly does world.mob do? It tells the game, "When someone logs in, make them a mob of this type!" So you have told the game, "After I use this verb, make everyone who joins at a later date a GM!" and the game does exactly what you've told it to do.

If that, for some reason, isn't what you're trying to tell the game to do, then break it down step by step into itsy witsy bitsy pieces and figure out exactly what line(s) of code will accomplish which step.

What you seem to be doing instead is throwing together something that kinda sorta seems vaguely like it might halfway do what you think you want... any surprise it's not working?

You've got three different things here:
1) src.gm = 1
2) src.world.mob = /mob/GM
3) and then a loop which adds all the verbs of mob/GM to src.

The 1st and 3rd thing go together... #1 flags the current mob as being the GM, in case you have anything check if you're GM at a later time (if you don't, then don't bother making a var for GM) and the third thing gives that var all the verbs that mob/GM would have anyway.

So what the heck is the second thing supposed to do? Trying to make a new mob that actually is this type mob/GM? If you do that, you'd need to actually make a new mob and log yourself into it, like this:

var/mob/GM/G = new
and then G.key = "DiZzyBonne" or G.key = src.key or G.client = src.client

or

src.client.mob = new/mob/GM

If you do that, then there's no point in having a GM = 1 or adding all the verbs 'cause the mob who's getting GM = 1 and getting all the verbs doesn't matter any more.

The only time you'd wanna bother having a GM=1 var is if there's no difference between the GM mob and the player mobs (like, they're all mob/Players, once just has extra vars.)

In short, you need to figure out what the hell you're actually trying to do: change an existing mob already in place into something that can function as a GM, or making a new mob that can function as a GM.
In response to Garthor
Then how do you change just one persons mob? Is it even possible?
In response to DiZzyBonne
One problem you're having is you're talking about "one person's mob." In the terms you're using, the person doesn't HAVE a mob, the person IS the mob. You need to deal with the client.mob or mob.key to do what you're trying to do... and as I pointed out in my post, if you're changing the mob, then why the trying truck do you bother to add all the verbs the new mob has anyway, and why do you bother setting up a var called GM?

Go up and read my post. Don't skim it, read it. It has -everything- you need to know.
mob
GM
key = "DiZzyBonne"
verb
//verbs here

Player
//player stuff here

world
mob = /mob/Player


The neat thing about having one admin is that you can set yourself to be the mob by default using the key variable. Simple as that, but if you want more than one mob, you'll have to go the path you're currently on, but you know; while knowing what you're doing.