ID:141235
 
Code:
mob
Login() // this is what happens when somone logs into your game.
var/gender = input("What gender are you?") in list ("Male","Female")/*The list pops-up these names*/
switch(gender)
if("Male")/*You put the same name as in list nex to if and between ()*/
icon='Male.dmi'/*Thats the icon they be*/
var/colour = input("what skin/hair colours do you want?") in list ("Black/Black","Black/Red","White/Black","White/Red","Black/Blonde","Black/Blue","White/Black","White/Blue")
switch(colour)
if("Black/Black")
icon_state='black/black'
if("Black/Red")
icon_state='black/red'
if("White/Black")
icon_state='white/black'
if("White/Red")
icon_state='white/red'
if("Black/Blonde")
icon_state='black/blonde'
if("Black/Blue")
icon_state='black/blue'
if("White/Blonde")
icon_state='white/blonde'
if("White/Blue")
icon_state='white/blue'


else icon='Female.dmi'/*You know about the icon i told you*/
var/colour = input("what skin/hair colours do you want?") in list ("Black/Black","Black/Red","White/Black","White/Red","Black/Blonde","Black/Blue","White/Black","White/Blue")
switch(colour)
if("Black/Black")
icon_state='black/black'
if("Black/Red")
icon_state='black/red'
if("White/Black")
icon_state='white/black'
if("White/Red")
icon_state='white/red'
if("Black/Blonde")
icon_state='black/blonde'
if("Black/Blue")
icon_state='black/blue'
if("White/Blonde")
icon_state='white/blonde'
if("White/Blue")
icon_state='white/blue'

..() /*Don't touch this*/


Problem description:ok, this was just a test login that i was fiddling with, cause i cant find anything thats wrong, cause, this works for me logically, but theese errors come up,
loading New.dme
login and logout.dm:10:error:'black/black':cannot find file
login and logout.dm:12:error:'black/red':cannot find file
login and logout.dm:14:error:'white/black':cannot find file
login and logout.dm:16:error:'white/red':cannot find file
login and logout.dm:18:error:'black/blonde':cannot find file
login and logout.dm:20:error:'black/blue':cannot find file
login and logout.dm:22:error:'white/blonde':cannot find file
login and logout.dm:24:error:'white/blue':cannot find file
login and logout.dm:28:error:colour :duplicate definition
login and logout.dm:7:error:colour :previous definition
login and logout.dm:31:error:'black/black':cannot find file
login and logout.dm:33:error:'black/red':cannot find file
login and logout.dm:35:error:'white/black':cannot find file
login and logout.dm:37:error:'white/red':cannot find file
login and logout.dm:39:error:'black/blonde':cannot find file
login and logout.dm:41:error:'black/blue':cannot find file
login and logout.dm:43:error:'white/blonde':cannot find file
login and logout.dm:45:error:'white/blue':cannot find file
Game.dm:108:error:M.DeathCheck:undefined proc

New.dmb - 19 errors, 0 warnings (double-click on an error to jump to it)


gonna try that now, i will tell ya if that works, also, can you tell me, is this a good code, or is there another code that is pretty much premade, that you recommend i use as a base
In response to Shiniru
ok, its gotten rid of the main problems, now, next problem


now, the error that keeps coming up anytime, i change ANYTHING!

loading New.dme
Game.dm:108:error:M.DeathCheck:undefined proc

New.dmb - 1 error, 0 warnings (double-click on an error to jump to it)

can you look through the other part of the code that is causeing this


Code:
mob
var

LVL = 1
HP = 30
MP = 50
EXP = 0
Cash = 0
STR = 10
DEF = 5
EXPN = 100
list
equipment = list("head","neck","body","left arm","right arm","hands","belt","legs","feet")



mob/monster
wasp
icon = 'wasp.dmi'
DEF = 4
HP = 20
LVL = 1
EXP = 0
Cash = 5
STR = 5
EXPN = 100
MP = 0



greendevil
icon = 'greendevil.dmi'
DEF = 6
HP = 25
LVL = 1
EXP = 0
Cash = 9
STR = 7
EXPN = 100
MP = 0


mob/Stat()
stat("LVL",LVL)
stat("HP",HP)
stat("MP",MP)
stat("EXP",EXP)
stat("Cash",Cash)
stat("STR",STR)
stat("DEF",DEF)
stat("EXP NEEDED",EXPN)
statpanel("Inventory",contents)



Del()
var/obj/gold/G = new(loc)
G.amount = rand(1,10)
..()









proc
DeathCheck()
if (HP <= 0)
world << "[src] dies!"
usr.EXP += 10
usr:lvlcheck()
del(src)



lvlcheck()
if(usr.EXP >=usr.EXPN) // if usr's exp is, or is bigger than what needed..
world << "[usr] has levled up!"
usr.LVL +=1 // add a lvl
usr.EXP = 0 // reset exp
usr.EXPN = usr.EXPN * 1.15 // double needed exp
usr.STR += rand(1,6)
usr.HP += rand(20,50)
usr.MP += rand(15,40)
usr.DEF += rand(1,7)
//insert bonuses here. Ie: strength, speed, etc.. Ex: usr.speed += 10






verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"

usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = usr.STR * 1.5 - M.DEF * 2
if(M.DEF >= usr.STR)
damage = 0
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()


Wsay(msg as text)
world << "[usr]: [msg]"

obj
gold //define a "gold" prototype, which is a kind of obj
icon = 'gold.dmi' //set the default icon
var
amount = 1
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.Cash += amount //add to usr.wealth
del(src) //delete the gold

equipment




turf
grass
icon = 'grass.dmi'

tree
icon = 'tree.dmi'

woodenfloor
icon = 'Wooden Floor.dmi'

blocker
icon = 'no access.dmi'

world
turf = /turf/grass
In response to Shiniru
DeathCheck is defined under /mob/monster.
Your code:
mob/monster //Anything under this will be under /mob/monster.
//...
proc
DeathCheck()
//...
verb
attack(mob/m as mob in oview(1)) //The monster can attack any mob, including those who don't have DeathCheck defined under them.

Fix:
mob
proc
DeathCheck()
//...
Stat() //I see in your code that your Stat() proc was for some reason /mob/monster/mob/Stat. Not the main problem, but still probably needs fixed.
//...
One way to make it a lot shorter:
icon_state=lowertext(colour) //Returns a forced-lowercase text string. "Black/Black" should become "black/black".

Of course, you could always capitalize the state names in your icon file. I assume it would cut down on a extremely small amount of lag(calling lowertext() and all), but if it only happens on login, it's no big deal.
In response to Kaiochao
ok, will try later, and thanks for the tips