How can I fix up this messy piece of coding? in Developer Help
|
|
mob/proc/Types() for(var/mob/M) if(istype(M.loc,/turf/farmland)) M.contents += new /obj/Herb M << "All your work paid off, You've farmed a herb!" M.Sleepiness -= 10 if(M.Thirst <= 0) M.Health -= rand(2,4) M << "Your thirsty you might want to get something to drink!" DeathCheck(M) if(M.Hunger <= 0) M.Health -= rand(2,4) M << "Your hungry you might want to get something to eat!" DeathCheck(M) if(M.Sleeping == 0) if(M.Sleepiness <= 0) M.Health -= rand(2,4) M << "Your sleepy you might want to get some rest!" DeathCheck(M) else ..() mob/proc/Time_Proc() Start if(RolePlaying == 1) Types() if(Time2 == 6) AMPM = "P.M." for(var/turf/T) T.icon = 'turfs2.dmi' else if(Time2 == 12) Time2 = 1 Time = "[Time2]:00 [AMPM]" AMPM = "A.M." else Time2 += 1 Time = "[Time2]:00 [AMPM]" sleep(10) goto(Start) else Time2 = 1 AMPM = "A.M." Time = "[Time2]:00 [AMPM]"
|
It also says:
runtime error: type mismatch
proc name: Time Proc (/mob/proc/Time_Proc)
source file: Misc..dm,96
usr: Thief jack (/mob/PC/soldier3)
src: Thief jack (/mob/PC/soldier3)
call stack:
Thief jack (/mob/PC/soldier3): Time Proc()
Thief jack (/mob/PC/soldier3): Role Play Mode()
|