ID:146495
 
Code:
var/p = new/list("Pow" = 2,"Int" = 0,"Spe" = 0,"Def" = 0)
while(p["Pow"])
txt1 += "<img src=pow>"
world << "hi"
p["Pow"] -= 1


Problem description:
The problem is with while(p["Pow"]) it won't (I guess) call that var, so my best guess is that I have to do it a certin way. Any help?

[Edit]
Stupid me.... Fixed it
var/p = new/list("Pow" = 2,"Int" = 0,"Spe" = 0,"Def" = 0)
var/pp = p["Pow"]
while(pp)
txt1 += "<img src=pow>"
world << "hi"
pp -= 1
The only problem I can see is that you're initializing the list incorrectly. If you use new/list(), then DM assumes the first argument is the length of the list (which will be padded with nulls). What you need is just plain list().

Lummox JR