ID:165505
 
I need some code on how to promote people ingame, the demo i found is not helpful.

Please Help

This is what i got -

Female
icon = 'Login.dmi'
icon_state = "f1"
density = 1
layer = OBJ_LAYER + 3
Click()
usr.loc=locate(1,2,2)
usr.name = input("What would you like your name to be?","Name input")
alert("Welcome aboard Recruit [usr.name] to the Battlestar Daedalus")
usr.icon = 'Colonial Mob.dmi'
usr.icon_state="Colonial Relaxation Clothles - Moving Female"
world << "[usr.key]/[usr.name] Has Joined Us as a Colonial Female Recruit!"
usr.invisibility = 0
MakePlayer(src)
usr.Save()

--------------------------------------------------------

mob/proc
MakeCommander(M as mob in world)
M:Rank = "Commander"
verbs += typesof(/mob/Admin/verb)
usr.overlays -= /obj/Colonial/Ranks/Recruit
usr.overlays += /obj/Colonial/Ranks/Commander

MakePlayer(M as mob in world)
M:Rank = "Player"
verbs -= typesof(/mob/Admin/verb)


And i get this error:
Main.dm:1073:error:MakePlayer:undefined proc

        Female
icon = 'Login.dmi'
icon_state = "f1"
density = 1
layer = OBJ_LAYER + 3
Click()
usr.loc=locate(1,2,2)
usr.name = input("What would you like your name to be?","Name input")
alert("Welcome aboard Recruit [usr.name] to the Battlestar Daedalus")
usr.icon = 'Colonial Mob.dmi'
usr.icon_state="Colonial Relaxation Clothles - Moving Female"
world << "[usr.key]/[usr.name] Has Joined Us as a Colonial Female Recruit!"
usr.invisibility = 0
usr.MakePlayer//(src)
usr.Save()

--------------------------------------------------------

mob/proc
MakeCommander(M as mob in world)
M:Rank = "Commander"
verbs += typesof(/mob/Admin/verb)
usr.overlays -= /obj/Colonial/Ranks/Recruit
usr.overlays += /obj/Colonial/Ranks/Commander

MakePlayer(M as mob in world)
M:Rank = "Player"
verbs -= typesof(/mob/Admin/verb)


Since its a mob proc you need to tweek when its used
In response to Miran94
Main.dm:1073:usr :warning: unused label
Main.dm:1073:MakePlayer :warning: unused label

ok, if you want to
In response to Miran94
You are abusing the colon operator and using usr in a proc, please don't help people if it's only going to screw them up in the long run. Naz, don't use that code. If you want I could write it for you.
In response to Xx Dark Wizard xX
mob
var/rank = "" // this is the default rank, change it as sees fit
verb
MakeCommander(mob/M in world)
M.rank = "Commander"
M.verbs += typesof(/mob/Admin/verb)
M.overlays -= /obj/Colonial/Ranks/Recruit
M.overlays += /obj/Colonial/Ranks/Commander
M<<"[src] has made you commander"
In response to Naztexz
i am getting constant
Main.dm:88: Inconsistent indentation.
i tried changing it a lot, thanks anyway
In response to Naztexz
You copied and pasted didn't you? The code was to learn from.
In response to KirbyAllStar
Actually thats the way I code them in my games and it always works for me, I have no idea why it happened to him
In response to Miran94
Miran94 wrote:
Actually thats the way I code them in my games and it always works for me, I have no idea why it happened to him

The fact it works for you doesn't mean it's necessarily correct and will necessarily always work - it's bad practice.
Naz, I'l make it an input for you if you like so you can choose what to call them or choose from a list.
Do you want me to?
In response to Kaioken
no need for help anymore, my game has found coders
In response to Naztexz
OOh wow Cngrats :D