ID:146959
 
I'm making an email system for my game..
atom var message sender email icon_state="Email" Click() if(usr.email==null) alert("You do not have an email address.","MiFo Inbox") switch(alert("Would you like to get an email address?","MiFo Inbox","Yes","No")) if("Yes") var/a=input("What do you want your username to be? username@domain.emp")as text var/b=input("What do you want your domainname to be? usrname@domain.emp")in list("MiFo.emp","ColdTransfer.emp","Yobot.mfo","Holler.mfo", "Psycho.pop","Etilyu.pop") switch(alert("Do you want your email address to be [a]@[b]?","MiFo Inbox","Yes","No")) if("Yes") usr.email="[a]@[b]" usr.inbox=new/mob/inbox(usr) else switch(alert("What do you want to do?","MiFo Inbox","Check EMail","Write Letter")) if("Check EMail") if(usr.inbox.contents==null)alert("Your inbox is empty.") else var/obj/email/roo=input("What letter do you want to look at?")in list(usr.inbox.contents) alert("[roo]") alert("Sent by [roo.sender]") if("Write Letter") var/d=input("Enter the e-mail address you want to send the message to.")as text var/obj/email/ema = new/obj/email(usr.inbox) var/nm1=input("What is the subject of the email?")as text ema.sender=usr.email ema.name="Subject: [nm1]" ema.message=input("What is the message?")as message for(var/mob/M as mob in world) if(M.email==d) M.inbox.contents+=ema email name="Subject: none"

When I send the message I get no runtimes, but upon opening my inbox, whether I've sent things to myself or not, I get the following runtime: runtime error: Cannot read null.sender proc name: Click (/obj/CIcons/email/Click) usr: FireEmblem (/mob) src: the email (/obj/CIcons/email) call stack: the email (/obj/CIcons/email): Click(the turf (14,5,1) (/turf))

Can anyone help me out?
perhaps you could try changing Atom, To mob
In response to Michael pol
Um, yeah. Did you have to dig up a thread from LAST THANKSGIVING to tell him that? Seriously, if he hasn't fixed the problem by now, he would have asked again or bumped his post. Necromancy = bad. Especially when it's unecessary, as this was.

~X