Login()
Switch(input("Whats your gender?","Gender") in list ("Male","Female"))
if ("Male") src.icon = 'male.dmi'
else src.icon = 'female.dmi'
..()
That doesnt work so can someone explain and help..
ID:167094
![]() Apr 30 2006, 3:24 pm
|
|
Can someone explain to me how to use Switch() and List() to make a Login() with asking questions.. i had
Login() That doesnt work so can someone explain and help.. |
![]() Apr 30 2006, 3:30 pm
|
|
lowercase the S in switch
|
First off its switch not Switch
Login() |
A.T.H.K wrote:
First off its switch not Switch second... usr abuse third indentation. There Fix'd. > Login() I personally would not use switch() for something that only has two things to select. and if() and alert() would work better. mob/Login() |
The receiver of the alert or input defaults to usr, so you have to manually send it through the first argument.
~~> Unknown Person |
That is why you aren't ready to yell at people when they are wrong.
input, alert, view, oview, range, orange all default to usr, you have to send the argument who the receiver is. |
look again.
http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/ Login() is one of those procs you don't use usr in. In input() usr is the default recipient. you must change that to src. |
Unknown Person wrote:
The receiver of the alert or input defaults to usr, so you have to manually send it through the first argument. oopz we all make mistakes and when you haven't sleept for 3 days i guess anyone could |
If he is using src for everything else, he might as well create a good habit by putting src in the arguement too.
|
Justin B wrote:
If he is using src for everything else, he might as well create a good habit by putting src in the arguement too. I'm not saying it wouldn't be good habit, I'm just saying (and not specifically to you) that there's no reason to jump on him for "usr abuse". |
Jp wrote:
Reboot() calls it. Yes, but doesn't it get called as it would normally, making usr safe? Reboot doesn't just 'reset' the world, it actually reboots, and every logs in 'naturally'. Isn't it the same as shutting down the game entirely and then opening it back up? |
For this
if(alert(src,"Race","race selection","Male","Female")=="Male") Can i use it more then once in a row? To get the sex.. then class.. etc |