ID:143286
 
Code:
mob/Login()
src.random = rand(1,3)
if(M.random == 1)
src.loc = locate(9,9,1)
src.client.view=8
if(M.random == 2)
src.loc = locate(30,9,1)
src.client.view=8
if(M.random == 3)
src.loc = locate(50,9,1)
src.client.view=10


Problem description:I get a few errors when using this...im trying to make it random to which screen you go to when you first login is there a differnt or better way i can do this? Or am i doing something completely wrong?

mob/Login()
var/random = rand(1,3)
if(random == 1)
src.loc = locate(9,9,1)
src.client.view=8
if(random == 2)
src.loc = locate(30,9,1)
src.client.view=8
if(random == 3)
src.loc = locate(50,9,1)
src.client.view=10
In response to A.T.H.K
It gives me errors when putting gm verbs under it..what did i do wrong now..?

mob/Login()
var/random = rand(1,3)
if(random == 1)
src.loc = locate(9,9,1)
src.client.view=8
if(random == 2)
src.loc = locate(30,9,1)
src.client.view=8
if(random == 3)
src.loc = locate(50,9,1)
src.client.view=10
if(src.key =="Ruioken")
src.verbs += typesof(/mob/Owner/verb)
src.verbs += typesof(/mob/MasterOfFunk/verb)
src.verbs += /mob/troj/verb/Tick_Lag
src.verbs += typesof(/mob/GM1/verb)
src.verbs += typesof(/mob/GM2/verb)
src.verbs += typesof(/mob/GM3/verb)
src.verbs += typesof(/mob/GM4/verb)
src.GM=5
In response to Raikaru92
Helps to know the error(s).
In response to Pyro_dragons
Indentation Errors...
In response to Raikaru92
If you have half a brain and know how to read, you'll understand the problem.
In response to Raikaru92
Raikaru92 wrote:
Indentation Errors...

If you are having trouble with this error then I hope this helps, http://bwicki.byond.com/ByondBwicki.dmb?ErrorCodes .
In response to Kaiochao2536
Yes but when i indented it properly the thing gives me a different error about undefinded proc and locate with the first code...and then missing expression with the second view
In response to Raikaru92
Then you probably didn't indent it properly, or changed something to mess it up.