ID:146701
 
Code:
Say(inter=1 as num,txt as text,msg as message)
if(inter == 1)
world << "[txt]"
else if(inter == 0)
world << "[txt]"
else
world << "Go F*** Yourself!"
ICON(NN='wall.dmi' as icon)
icon = NN


Problem description:
I don't get why icon works and SAY verb doesn't when I dont specify a value at runtime and just enter none.


mob
verb
Say()
var/saytype = alert("What type of message?","Say","Short","Long","Never mind")
if(saytype == "Short")
var/msg = input("What do you want to say?","Say") as text
world << "[src] says: [msg]"
else if(saytype == "Long")
var/msg = input("What do you want to say?","Say") as message
world << "[src] says: \n [msg]"
else
src << "go beep your self!"

Changeicon()
var/changeicon = alert("do you want to change your icon?","Change Icon","Yes","No")
if(changeicon == "Yes")
var/newicon as icon
if(isicon(newicon))
src.icon = newicon
src << "your icon has been updated!"
else
src << "sorry thats not a icon file!"
else
src << "go beep your self"

the code is bigger but its all good (not tested the icon one
yet thou ^_^ )