ID:143671
 
Code:
mob
Login()
switch(alert("Who's side would you like to be on?","Bowser's side!","Mario's side!"))//The alert to ask Which Side you want to be on
if("Bowser's side!")//If they selected that option
icon = 'mobs.dmi'//The icon file
icon_state = "Bowser M 1"//The icon state
usr loc. = (1,1,1)
if("Mario's side!")//If they selected this option!
icon = 'mobs.dmi'//The icon file
icon_state = "Mario M 1"//The Icon state..
usr loc. = (1,1,1)


Problem description:
I knwo tis easy...lol But I am new to programmign so HELP!
For future reference: always include the errors with your post! It helps us know what's going on. =P

A few errors:
You don't want a full stop after loc- that'd only be useful if you were accessing a variable or proc that belonged to that variable. You'd want a fullstop in between usr and loc, though!

For sake of consistency, don't use usr. You've used src in the rest of the Login proc (as you've not given icon and icon_state an object reference for them to belong to, they automatically default to src. So even if you didn't write it, you technically did use it. =P), so you should use that instead of usr.

Also, be warned: usr isn't always safe in Login (if Login is called manually, for instance: read this for more information), so it's often a better idea to use src instead.

Also: it's also a good idea to use Move instead of setting a loc directly. Example:
Move(locate(1,1,1))


Hope that helps!
In adition to what Elation said, make sure you add ..() in the end of both if statements!
In response to Revojake
You don't really have to add ..()... It's just without it, the Login() proc doesn't move you anywhere. Just gotta move them yourself, like he did.
In response to Elation
Elation wrote:
You don't want a full stop after loc- that'd only be useful if you were accessing a variable or proc that belonged to that variable. You'd want a fullstop in between usr and loc, though!

For clarity, it's actually called a period, not a full stop.

Lummox JR
In response to Revojake
Revojake wrote:
In adition to what Elation said, make sure you add ..() in the end of both if statements!

Putting ..() in both blocks would be redundant, when you could call it just once after the switch() and be fine. Never ever do something in N different places that you can do just once!

Lummox JR