ID:263282
 
Code:
//Ice Spell Proc
Projectile_Launcher()
var/obj/Spells/DarkMagic/Ice/I = new(src.loc)
step(I,src.dir)


//Frozen Water
Water
density = 1
icon_state = "water"
Entered(obj/O)
if(istype(O,/obj/Spells/DarkMagic/Ice))
new/turf/FrozenWater(src.loc)
FrozenWater
icon = 'Spells.dmi'
icon_state = "FrozenWater"
density = 0


Problem description:
I get this runtime error when I launch the Ice. Also, the Ice doesn't move when launched

Runtime Error:

runtime error: bad loc
proc name: Entered (/turf/Water/Entered)
usr: 0
src: Water (66,18,2) (/turf/Water)
call stack:
Water (66,18,2) (/turf/Water): Entered(Ice (/obj/Spells/DarkMagic/Ice), Grass (66,19,2) (/turf/Grass))
Dead_Demon (/mob/Player): Projectile Launcher()
Dead_Demon (/mob/Player): Launch()
Ok, there are two problems I see here:

            step(I,src.dir)


step() does exactly as it sounds. It takes a step. You most likely want more than one step. You can use walk() (Look it up for it's arguments) or you can use a loop.

                new/turf/FrozenWater(src.loc)


Okay, now the problem in this is the "src.loc" part. Think about it for a second. What is a turf's location set to? The answer is simple: an area. When creating something inside of an area, it assumes you wanted the bottom left corner of the entire area, and that's where it places it. There is special case for creating turfs inside of turfs. It's not possible, so it replaces the old turf with the new one; exactly what you wanted. So just change "src.loc" to "src".

That should be everything, although it might be a better idea to just change the turf's icon and density, and then change it back instead of creating a new one.

In response to DarkCampainger
Coolness. Thank you very much.