ID:143319
 
Code:
#define MaxLen 999

mob/GM/
verb
Change_Prefix()
set category = "GM"
set name = "Prefix"
prefix = copytext(prefix,1,MaxLen+1)
var/pre = input("Please type in your prefix. The Prefix maker will cut it down so that it is only [MaxLen] characters long","PREFIX",prefix) as null|text
if(!pre) return
else
if(length(pre) >= MaxLen+1)
pre = copytext(pre,1,MaxLen+1)
pre += ""
prefix = pre
Delete_Prefix(mob/M in world)
set category = "GM"
set name = "Delete Prefix"
prefix = null




var/prefix


Problem description:
That code works, It does what it is supposed to do. But there is one annoying problem with it.
When i use it to put GM as my Prefix, Everyone in the game has it. Even when i choose my name out of the list, It makes everyone have a Prefix.

Can someone fix this please?
i dont see how it would even show you a list of people given thats the code your using, and i dont see where you use usr.prefix to set your prefix as what its supposed to be.

paste the full code your using and ill be able to help, or otherwise point out to me, where it does those two things at.
#define MaxLen 999

mob/GM/
verb
Change_Prefix(mob/M in world)
set category = "GM"
set name = "Prefix"
var/D = input("What do you want [M]'s prefix to be good master [usr]") as text
M.Prefix=D
return

Prefix is already defined by default, and im not sure if this will work i just whipped it up fast, but you don't have to define prefix no mater what
In response to Lt. Pain
i didnt say about defining prefix, where does the code make a list come up of players names for you to be able to choose your name, cause it doesnt look like it does

also, it doesnt look like it sets your prefix variable to anything anyways.

if the list doesnt come up, tell me.