ID:173699
 
I was bored today so i went on writing up a script for a 'maybe' to do 'game'. But i came across an error when i tried testing my saving/loading. I get the loading and saving to work but with a runtime "proc name: Check (/mob/proc/Check)
source file: Save.dm,20
usr: Crashed (/mob)
src: Crashed (/mob)
call stack:
Crashed (/mob): Check()
Crashed (/mob): Stuff()
Crashed (/mob): Login()"

and the line that's errored is switch(input(src,"What race shall you choose?")in list("Wardox","Chaling","Erntcam","Humans"))

This is getting anoying for i can't find the problem, please help.



mob/verb/Save()
var/savefile/F = new("players/[src.ckey].sav")
F["Mob"] << src.client.mob

mob/proc/Load()
var/savefile/F = new("players/[src.ckey].sav")
var/mob/character
F["Mob"] >> character
..()


mob/Login()
src.Stuff()


mob/proc/Stuff()
src.Load()
src.Check()


mob
proc/Check()
if(!Set)
switch(input(src,"What race shall you choose?")in list("Wardox","Chaling","Erntcam","Humans"))


if("Wardox")
switch(alert(src,"Wardox's are high in strength and power, but low in stats when it comes to money and population growth. Are you sure you want this race?",,"Yes","No"))
if("No")
Login()
if("Yes")
src.Race="Wardox"
src<<"\red ..Race selection sucessfull.."
src.Set++


if("Chaling")
switch(alert(src,"These people never get bored! All they do is reproduce, they couldn't care less of attacking and money. Are you sure you want this race?",,"Yes","No"))
if("No")
Login()
if("Yes")
src.Race="Chaling"
src<<"\red ..Race selection sucessfull.."
src.Set++


if("Erntcam")
switch(alert(src,"All they do is want money money and more money! They pay for people to attack others, but don't have time to produce. Are you sure you want this race?",,"Yes","No"))
if("No")
Login()
if("Yes")
src.Race="Erntcam"
src<<"\red ..Race selection sucessfull.."
src.Set++


if("Human")
switch(alert(src,"Humans love money, reproducing, and fighting, They are great in overall. Are you sure you want this race?",,"Yes","No"))
if("No")
Login()
if("Yes")
src.Race="Human"
src<<"\red ..Race selection sucessfull.."
src.Set++</<>
var/C = input("What race shall you choose?","")in list("Wardox","Chaling","Erntcam","Humans")

Siientx
In response to Siientx
That won't help, Siientx; it'll work fine the way he has it set up.

Crashed, you left out the actual error message. Not helpful. =P There's a line above "proc name [blah]" that says the error message, which is pretty darn important to know.
In response to Crispy
Couldn't you just look for it?

mob
proc/Check()
if(!Set)
switch(input(src,"What race shall you choose?")in list("Wardox","Chaling","Erntcam","Humans"))
In response to Crashed
First rule of getting help: help those who help you, which means try to provide as much information as possible to try and aid the kind people who take time out of their day to stop, read and try to answer your post.
In response to Goku72
I provided a little part about whats wrong, then i added the part that was the error, i gave up most information i could give. That's helping enough, isn't it?
In response to Crashed
You didn't provide the error. Only the code file, usr, src, line number, and call stack.
In response to Garthor
Once again, the error in the runtime was that switch(input(src,blah)in list())

Theres the error, i already gave this information. But this doesn't seem to be the error, therfore i don't know the error (if it's not this)
In response to Crashed
NO! THEY MEAN THE ERROR! Not the error line!

such as:

run-time error: bad loc

or

run-time error: possible infinate cross loop

or something like that
In response to Crashed
No you didn't... you have no idea what I'm saying, do you...

There are a bunch of lines that appear in Dream Seeker in red monospace text when you get an error, right? You copied some of those lines, but not the most important one, which is the first one. It'll say something like "runtime error: division by zero" or "runtime error: Crashed doesn't understand what the hell Crispy is on about". We need to know what that line says first, because it's not at all clear from the code and the rest of the error message what it might be.