ID:148237
 
im making a minning section. The getting ore is fine but now when it come to smelting i have a problem

runtime error: cannot remove from list
proc name: Smelt (/obj/forge/verb/Smelt)
source file: skills.dm,49
usr: Cloud (/mob/characters/Knight)
src: Forge (/obj/forge)
call stack:
Forge (/obj/forge): Smelt()
my code is like this

if (prob(10))
usr << "You smelted your tin ore to a bar!"
usr.contents+=new/obj/tinbar
usr.contents-=/obj/tin
else
usr << "
You ruined your ore."
Problems:

  • You're trying to remove a type path from a contents list; contents contains atoms, not types, so you have to use locate() to find a tin bar.
  • You forgot to close your HTML tags and use <DM> around your code.

    Lummox JR
In response to Lummox JR
Why do i need to put
 around my code wuts it do. Also i tried using locate but im not sure wut to do exactly please a little more info would help
In response to Cloud54367
It formats the code so it doesnt wrap around to stay on screen, and its much easier to read. And just to let you know that its spelled mining.