ID:139922
 
Code:village system
var/list/L
L = list("Leaf")


mob/Hokage
verb
Promote(mob/M in (Village <= "Leaf"))
set category = "Hokage"
var/a = input("Rank your Village")in list("Anbu","Jounin")
if(a=="Anbu")
M.Villagetitle = "Anbu"
M << "You are now an Anbu"
usr << "You have made [M] an Anbu"
else if(M.Villagetitle == "Academy Student")
M.Villagetitle = "Academy Student"
usr << "They must pass Chunin exam first!"
else if(M.Villagetitle == "Gunin")
M.Villagetitle = "Gunin"
usr << "They must pass Chunin exam first!"
if(a=="Jounin")
M.Villagetitle = "Jounin"
M << "You are now an Jounin"
usr << "You have made [M] an Jounin"
else if(M.Villagetitle == "Academy Student")
M.Villagetitle = "Academy Student"
usr << "They must pass Chunin exam first!"
else if(M.Villagetitle == "Gunin")
M.Villagetitle = "Gunin"
usr << "They must pass Chunin exam first!"

Village_Track(mob/M in (Village <= "Leaf"))
set category = "Hokage"
src.x = M:x
src.y = M:y-1
src.z = M:z
M << "[src] instantly apears before you!"
src << "you apear before [M]"

Attack_Sand(mob in (Village <= "Leaf"))
set category = "Hokage"
mob << "This is war time attack the Sand"


Problem description:
in my code im setting up a village system so people can choose witch to belong to. but when it comes to commands for the villiages it gives me the runtime error
iv created lists that it says it was missing so im kinda lost on what u guys need to see. but here are the commands
var/list/L
L = list("Leaf")
mob/var/tmp/Villagetitle = ""

mob/Hokage/verb
Promote(mob/M in usr.Village)
set category = "Hokage"
switch(input("Promote [M]")in list("Anbu","Jounin"))
if("Anbu")
if(M.Villagetitle == "Academy Student")
usr.<<"They must become a Jounin first."
return 0
if(M.Villagetitle == "Genin")
usr.<<"They must become a Jounin first."
return 0
else
M.Villagetitle = "Anbu"
M.<<"You were promoted to Anbu"
usr.<<"You promoted [M] to Anbu"
if("Jounin")
if(M.Villagetitle == "Genin")
M.Villagetitle = "Genin"
usr << "They must pass Chunin exam first!"
return 0
if(M.Villagetitle == "Academy Student")
M.Villagetitle = "Academy Student"
usr << "They must pass Chunin exam first!"
return 0
else
M.Villagetitle = "Jounin"
M.<<"You were promoted to Jounin"
usr.<<"You promoted [M] to Jounin"

VillageTrack(mob/M in (usr.Village))
set category = "Hokage"
set name = "Village Track"
src.x = M:x
src.y = M:y-1
src.z = M:z
M.<<"[src] appears before you"
usr.<<"You appear infront of [M]"

AttackSand(mob/M in (usr.Village))
set category = "Hokage"
set name = "Attack Sand"
M.<<"This is war time, attack Sand!"

I think I fixed it...Not too sure if it's the most efficient way of doing it, but it should do what you need it to. =o