ID:142085
 
Code:
mob
proc
Cast(SpellName,Casting)
var/mob/Target
var/obj/MagikPlates/C = locate(contents)
if(Casting==0)
C.casting=1//line 54
obj/MagikPlates
var/obj/Cooldown/C
var/cooldown=124
var/casting=0
New()
..()
C = new()
src.overlays+=C
C.ontop=src
DblClick()
usr.Cast(src.icon_state,src.casting)

obj/Cooldown
layer=105
icon='Cooldown.dmi'
var/decreser=1
var/cframe=0
var/obj/MagikPlates/ontop
icon_state="124"
New()
..()
spawn
for()
if(ontop)
if(ontop.casting)
cframe=0
ontop.overlays-=src
decreser=round(124/ontop.cooldown)
cframe+=decreser
if(cframe<=0)
cframe=0
if(cframe>=124)
cframe=124
icon_state="[cframe]"
ontop.overlays+=src
sleep(10)
else
break

runtime error: Cannot modify null.casting.
proc name: Cast (/mob/proc/Cast)
source file: Casting Procs.dm,54
usr: \[Owner] Nategrant (/mob)
src: \[Owner] Nategrant (/mob)
call stack:
\[Owner] Nategrant (/mob): Cast("Pebble", 0)
Pebble (/obj/MagikPlates/Pebble): DblClick("Spells", "info.info", "left=1")

Problem description:
Well when I call Cast I want magikplates's casting var to change triggering cooldown's var "cframe" to turn into 0
but all I get are runtime error's.
mob/proc
Cast(SpellName,Casting)
var/mob/Target
for(var/obj/MagikPlates/C in src.contents)
if(!Casting && C) C.casting=1


^ Why are you defining Target if you're not using it ?

Same for "SpellName".


[EDIT]: Nevermind about Spell name, I just read through the rest of your code, but the Target bit still stands.
In response to Andre-g1
Sry its just for code i took out that has nothing to do witht his bit... just ignore those 2 vars
Also now when I call the cast proc the repeaitiveness stops (obj/Cooldown)
Your problem is here:
            var/obj/MagikPlates/C = locate(contents)

Lists aren't atoms, so they're not on the map, which means locate() won't find one. Try this instead:
            var/obj/MagikPlates/C = locate() in contents