ID:177131
 
mob/var/list/tmpvars = list()
var/var1 = ""


mob
host/verb
Setvar1(T as text)
var1 = T
usr << "Var1 is now [var1]"
Addvar1(mob/M in world)
M.tmpvars += var1

Whats wrong with this?.. It has no errors but when I use the verb those stupid runtime errors pop up.
what do the errors say?
In response to Super16
Nevermind I have resolved the problem.. it was being caused by this.

EraseStats(mob/M in world)
set category= "Host"
var/promptbox = alert("Are you sure you want to delete all of [M] stats?","Erase Stats","Yes","No")
if(promptbox == "Yes")
M.tmpvars = 0
if(promptbox == "No")
return
that was supposed to erase all the persons tmpvars.. but it caused runtime errors when trying to add stats to someone so it is fixed now.. =-p ty anyway
In response to Jacob
But now I have another problem..I need to make something else to erase all of the persons stats without causing those errors.
In response to Jacob
M.tmpvars.Cut()
In response to Super16
Thanks. ..I hadn o idea about Cut.. Need to get my nose into the book sometime
Jacob wrote:
mob/var/list/tmpvars = list()
var/var1 = ""

This isn't a safe way to initialize the list unless you want all mobs to share the same list.
What will happen here is that the list is initialized at compile-time and this same list then belongs to all mobs. Any changes to the list will affect every mob.

What you should do instead is initialize the list in New() or Login():
mob
Login()
tmpvars=list()
..()

Lummox JR