ID:139847
 
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:

I get a runtime error that says the list doesnt exist. what am i missing and if you dont mind telling me how i would go about fixing it or doing this better
Wow... the amount of syntax errors there is just...
Welcome to DM programming!
In response to Moonlight Memento
awsome witch directory should i go to for my specific issue.
In response to Bigj822
Really? as far as I can see he really told you to look over your syntax because that is where your error is coming from (among a few other things).
Just to name a few of the issues here...

  • You shouldn't be using ":" in 99% of cases to access an atoms' variable.
  • What is with the Attack_Sand thing? Why would you compare a variable called village to a string to see if it is less than or equal to it?
  • Why are you sending messages to the mob instead of the client connected to the mob, or the source.
  • Why is a variable set as a text string? You should be doing something like:
#define Leaf_Village 1
if(Village == Leaf_Village)


  • You shouldn't be defining lists in that form.

    And there are many other issues. To just nonchalantly type in yawn is sort of disrespectful to somebody who has much more programming experience than yourself. Another thing is that you should be using correct spelling, not only to be proper, but to show that you are taking the time and effort to make everything as clear as possible to those whom are helping you.
In response to Darkjohn66
Darkjohn66 wrote:
Just to name a few of the issues here...

  • You shouldn't be using ":" in 99% of cases to access an atoms' variable.
  • What is with the Attack_Sand thing? Why would you compare a variable called village to a string to see if it is less than or equal to it?
  • Why are you sending messages to the mob instead of the client connected to the mob, or the source.
  • Why is a variable set as a text string? You should be doing something like:
> #define Leaf_Village 1
> if(Village == Leaf_Village)
>

  • You shouldn't be defining lists in that form.
    And there are many other issues. To just nonchalantly type in yawn is sort of disrespectful to somebody who has much more programming experience than yourself. Another thing is that you should be using correct spelling, not only to be proper, but to show that you are taking the time and effort to make everything as clear as possible to those whom are helping you.

    I do thank thee for your help. My yawn was a quick replace of my first comment it was an edit not my original statement. I didnt think somthing so trivial would be important and as to the spelling thing you cant ask everyone to be an expert speller in most of my post i before hand appologise for my lack in spelling but im fed up with peoples attitudes on all subjects. My thoughts are if you clearly dont wanna say anything of value why waste your time talking ,but once agin i do thank you for your code help.
    P.S. try being a little less cocky when throwing out small insults in the form of conversational questions.
In response to Bigj822
A question was posed to make you think. Not to boost my ego.

_>