// give the player some attacks
abilities += new /Ability/MeleeAttack()
abilities += new /Ability/Cleave()
abilities += new /Ability/Poison()
abilities += new /Ability/Fireball()
abilities += new /Ability/ShootArrow()
// and a crafting ability
abilities += new /CraftingAbility/MakeSword()
the problem is that when i remove an ability code, i get a runtime error.
runtime error: list index out of bounds
proc name: new character (/mob/new_character)
source file: mobs.dm,108
usr: the temporary (/mob/temporary)
src: the test (/mob)
call stack:
the test (/mob): new character()
Kalster (/client): new character(3)
select(null)
key down("space", Kalster (/client))
Kalster (/client): KeyDown("space")
bind_key("6", abilities[6])
If you only add five abilities there, abilities[6] will give you an error. You can remove those lines so there are no default key bindings or update the list indexes to be correct.