ID:264072
 
Code:
mob/player
Login()
if(src.key=="Mr. Chex")
usr.GM = 1


Problem description:
Theres my code but because of that code when i log on i do not go to the title screen. Please tell whats wrong and how to fix it and the correct code

You need to call the parent proc --- ..() --- to do the other stuff that happens during /mob/Login().
In response to Kuraudo
can you put it in a code
In response to Mr. Chex
Mr. Chex wrote:
can you put it in a code

world/Del()
..()

...seriously, how hard is it to put ..() in the beggining of your Login()?

Everytime you post you beg for code for your ripped game, I swear.
In response to Eternal Desire
so add that to the bottom
In response to Mr. Chex
Mr. Chex wrote:
so add that to the bottom

...you've never used ..() in Login() before?
In response to Eternal Desire
so if im correct like this
mob/player
Login()
if(src.key=="Mr. Chex)")
usr.GM = 1
..()
In response to Mr. Chex
Mr. Chex wrote:
so if im correct like this
> mob/player
> Login()
> if(src.key=="Mr. Chex)")
> usr.GM = 1
> ..()

...*bashes head into desk until red stuff appears*
In response to Eternal Desire
ty and ouch
In response to Eternal Desire
Eternal Desire wrote:
Everytime you post you beg for code for your ripped game, I swear.

Then why help him? seriously why help him at all?

No need to be mean to him.
In response to Mr. Chex
A more efficient way is like this:

var/list/GMs[65335][65335][65335] //Creates a GM list

mob
Login()
if(src.key == "Mr. Chex")
src << "k ur a gm"
GMs += src
In response to Darkmag1c1an11
Darkmag1c1an11 wrote:
A more efficient way is like this:

var/admins = list("ME","YOU","AND","WHO","EVER")
var/AdminsOnline[]
mob/proc
Admincheck()
for(var/a in admins)
if(src.key == a)
AdminsOnline += src
src.Admin = 1


And of course that would be inserted into the Login.

mob
var/Admin = 0
Stat()
statpanel("Admins Online RIGHT NOW!")
for(var/mob/M in AdminsOnline)
stat(M.key)
Login()
src.AdminCheck()
..()
Logout()
if(src.Admin)
AdminsOnline -= src


Sorry if its not all correct i haven't used byond in awhile plus i had to use the website to write it all no notepad or anything lol.
In response to A.T.H.K
Yea, that's not very good. If you want to do it like that, then do this:
var/list/admin = list(/* List of ckeys goes here */)

client/New()
..()

if(ckey in admin) verbs += typesof(/client/admin/verb)

It's best to add the verbs to a client so they will still be an administrator because they switched mobs.
In response to Popisfizzy


:D hehe couldn't resist.