mob/player/client
var
list/Achievements = list("First Blood" = 0,\
"Ten Shot Revolver" = 0,\
"One Hundred Bodys" = 0,\
"Zombie Slayer" = 0,\
"Fire in the hole" = 0,\
"Signed up" = 0,\
"Victory" = 0,\
"You Lose" = 0,\
"Level Up" = 0,\
"Level Ten" = 0,\
"Level One Hundred" = 0,\
"Out with the old" = 0,\
"In with the new" = 0,\
"Reload..." = 0,\
"F..F..F" = 0,\
"Medic!" = 0,\
"Sentry goin' up!" = 0,\
"Lazy Commander" = 0,\
"Burn Baby Burn" = 0,\
"Well Travelled" = 0)
(...)
proc/check_ach()
for(var/i = 20, i>0, i--)
var/ach_done = 0
if((src.Achievements[i]) == 1)continue
switch(src.Achievements[i])
(...)
Problem description:
I'm getting a runtime error stating bad index on if((src.Achievements[i]) == 1)continue. Mind shedding some light? I've tried searching 'Bad Index' but haven't gotten any useful topics.
Also: src.Achievements[i] is going to give you a text string, not a number, so comparing it to 1 is silly.