ID:143141
 
Code:
mob
verb
Ice_Explode(mob/M in oview(6))
set category = "Spells"
if(usr.Ice1==0)
var/IceDamage=usr.Iceskill+usr.mpower-M.Magdef
M.freeze=1
usr.freeze=1
view()<<"Ice Explode"
usr.Mana-=50
M.HP-=usr.IceDamage
M.overlays+='Ice Explode.dmi'
sleep(8)
M.overlays-='Ice Explode.dmi'
M.freeze=0
usr.freeze=0
usr.Ice1=1
usr.Ice1time=10
sleep(10)
usr.Ice1time=9
sleep(10)
usr.Ice1time=8
sleep(10)
usr.Ice1time=7
sleep(10)
usr.Ice1time=6
sleep(10)
usr.Ice1time=5
sleep(10)
usr.Ice1time=4
sleep(10)
usr.Ice1time=3
sleep(10)
usr.Ice1time=2
sleep(10)
usr.Ice1time=1
sleep(10)
usr.Ice1=0
else
usr<<"You must wait [usr.Ice1time] till you can use this spell again"


mob
var
Ice1=0
Ice1time=0
Iceskill=25
mpower=25
Magdef=10


Problem description:
magic.dm:11:error:usr.IceDamage:undefined var
magic.dm:6:IceDamage :warning: variable defined but not used

it says
var/IceDamage=usr.Iceskill+usr.mpower-M.Magdef

is defined but not used and
M.HP-=usr.IceDamage

is undefined

usr.IceDamage is looking for a mob/var/IceDamage. You just want to be using IceDamage.

Additionally, you have a whole lot of redundant coden ear the end of that proc. Instead of all the Ice1 and Ice1time stuff, just have one variable, nextIceTime. Make sure it's a tmp variable (otherwise: it'll get saved, and then bad things happpen), then set it to world.time + 100. Then, the Ice1 check is replaced by if(world.time <= nextIceTime). If that's not true, you can tell them that they have to wait [nextIceTime - world.time] seconds.
In response to Garthor
lol do you reply to all my things, yea sry i made this code back when i just started.