ID:263063
 
Code:
    Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click(mob/M)
alert("So you wish to be a boy, correct?","Boy","Yes","No")in list("Yes","No")
if("Yes")
M.icon_state = "MaleWhiteBase"
if("No")
return


Problem description:

Gah...I havent coded in a while...When I click yes, it doesnt make my icon state what I want it to be.
If your trying to do what i think your trying to do try

    Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click()
alert("So you wish to be a boy, correct?","Boy","Yes","No")in list("Yes","No")
if("Yes")
usr.icon_state = "MaleWhiteBase"
if("No")
return


But if you are trying to make it a whole different icon instead of a icon state try

    Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click()
alert("So you wish to be a boy, correct?","Boy","Yes","No")in list("Yes","No")
if("Yes")
usr.icon = 'MaleWhiteBase.dmi'
if("No")
return




In response to Kore2
Kore2 wrote:
If your trying to do what i think your trying to do try

    Choice
> Gender
> name = ""
> icon = 'BoyOrGirl.bmp'
> Boy
> icon = 'BoyChoice.png'
> Click()
> alert("So you wish to be a boy, correct?","Boy","Yes","No")in list("Yes","No")
> if("Yes")
> usr.icon_state = "MaleWhiteBase"
> if("No")
> return

But if you are trying to make it a whole different icon instead of a icon state try

    Choice
> Gender
> name = ""
> icon = 'BoyOrGirl.bmp'
> Boy
> icon = 'BoyChoice.png'
> Click()
> alert("So you wish to be a boy, correct?","Boy","Yes","No")in list("Yes","No")
> if("Yes")
> usr.icon_state = 'MaleWhiteBase.dmi'
> if("No")
> return


Yeah, I fixed that just before you posted. But now, if I choose No, I still get an icon.(my script looks just like yours)
In response to Dead_Demon
Also get rid of the in list ("Yes","No") since you have those twice >.>;

    Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click()
alert("So you wish to be a boy, correct?","Boy","Yes","No")
if("Yes")
usr.icon = 'MaleWhiteBase.dmi'
if("No")
return


In response to Kore2
Kore2 wrote:
Also get rid of the in list ("Yes","No") since you have those twice >.>;

    Choice
> Gender
> name = ""
> icon = 'BoyOrGirl.bmp'
> Boy
> icon = 'BoyChoice.png'
> Click()
> alert("So you wish to be a boy, correct?","Boy","Yes","No")
> if("Yes")
> usr.icon = 'MaleWhiteBase.dmi'
> if("No")
> return


I did that, Im still getting an icon when I click No T_____T
In response to Dead_Demon
Is it possible to see the whole code from the turf/ or wherever?
In response to Kore2
Yeah.

Here
obj
BackLayer
name = ""
icon = 'white.dmi'
density = 0

InvisableWall
name = ""
Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click()
alert("So you wish to be a boy, correct?","Boy","Yes","No")
if("Yes")
usr.icon_state = "MaleWhiteBase"
if("No")
return
Girl
icon = 'GirlChoice.png'
In response to Dead_Demon
turf/Choice
Gender
name = ""
icon = 'BoyOrGirl.bmp'
Boy
icon = 'BoyChoice.png'
Click()
alert("So you wish to be a boy, correct?","Boy","Yes","No")

if("Yes")
usr.icon= 'MaleWhiteBase.dmi'
if("No")
return


Honestly I can't think of anything else other then this because I am not too experienced with Login screens.
In response to Kore2
Ahh, Im starting to remember how to code again! Yay! I forgot its s'posed to be

switch(alert("You want to be a boy, correct?","Boy","Yes","No"))
if("Yes")
usr.icon_state = "MaleWhiteBase"
if("No")
return


:P Thanks for helping me remember
In response to Dead_Demon
Hah i forgot all about switch >.>;
In response to Kore2
... A text string that isn't part of a switch or var in an if() proc is always a true value.
In response to Dead_Demon


if(alert("You want to be a boy,correct?" ,"Boy","Yes","No")=="Yes")
usr.icon_state = "MaleWhiteBase"


How about not using switch() at all?