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.
^ 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.