var/list/WordList = list ("")
mob/proc/TerritoryCheck(T as text,var/list/L)
for(var/V in L)
if(findtext(T,V))
return TRUE
mob
verb
Territory(mob/M in view(8))
usr <<" You have Activated Your Territory"
M <<" Your in [usr]'s Territory Dont move"
M.freeze = 1
sleep(20)
M.freeze = 0
switch(input("What would u like too do?") in list("Add Word","Clear list"))
if("Add Word")
var/Word = input("What word would you like to add") as text
var/list/Word+="[Word]"
what im i Trying to do is like when u activate the territory
it asks you what u want to Do and i want to add a Word So yeah then when You type it in , The text u typed in goes to the WordList. thats what im trying to do >_>
ID:158756
Jul 4 2009, 9:15 pm
|
|
You have your WordList list, which should be defined like this:
mob/var/list/WordList=list() //new, empty list that belongs to the player. You want to check if the word T is in the list L: mob/proc/TerritoryCheck(T, list/L) You want to add a word to the list. WordList += input(src,"What word would you like to add?","Add Word")//as text = default input() type You tried to create a new list and add the word to it, which would do absolutely nothing. You already defined an existing list. |
Please post all code in dm tags when posting on the forum, this will make everyone elses job much easier. If you don't know what these tags are, http://www.byond.com/developer/forum/?action=forum_help