everything seems alright in DM
but when i score i get a runtime error
runtime error: Cannot modify null.icon_state.
proc name: Rscore (/proc/Rscore)
now, i dont understand that
im using a proc to change the scoreboard's icon state
here are the procs:
proc/Rscore(obj/rscoreboard/R)
if(Rscore == 1)
R.icon_state = "R1"
if(Rscore == 2)
R.icon_state = "R2"
if(Rscore == 3)
R.icon_state = "R3"
if(Rscore == 4)
R.icon_state = "R4"
if(Rscore == 5)
R.icon_state = "R5"
else
R.icon_state = "R0"
proc/Bscore(obj/bscoreboard/B)
if(Bscore == 1)
B.icon_state = "B1"
if(Bscore == 2)
B.icon_state = "B2"
if(Bscore == 3)
B.icon_state = "B3"
if(Bscore == 4)
B.icon_state = "B4"
if(Bscore == 5)
B.icon_state = "B5"
else
B.icon_state = "B0"
they seem fine
but i dont know
im calling them when my ball goes into the net turf
here is the net code:
net1
icon = 'Soccer.dmi'
icon_state = "net1"
Entered(obj/O)
if(istype(O,/obj/soccerball))//replace /mob/player with your player's mob type
O.loc=locate(11,10,7)//location inside the location the door leads to
world << "<font color = red>The Red team scored!!"
Rscore += 1
walk(O,0)
Rscore()
if(Rscore >= 5)
world << "<font color = red>Red team WINS!!!!"
Rscore = 0
Bscore = 0
return ..()
net2
icon = 'Soccer.dmi'
icon_state = "net2"
Entered(obj/O)
if(istype(O,/obj/soccerball))//replace /mob/player with your player's mob type
O.loc=locate(11,10,7)//location inside the location the door leads to
world << "<font color = red>The Red team scored!!"
Rscore += 1
walk(O,0)
Rscore()
if(Rscore >= 5)
world << "<font color = red>Red team WINS!!!!"
Rscore = 0
Bscore = 0
return ..()
net3
icon = 'Soccer.dmi'
icon_state = "net3"
Entered(obj/O)
if(istype(O,/obj/soccerball))//replace /mob/player with your player's mob type
O.loc=locate(11,10,7)//location inside the location the door leads to
world << "The Blue team scored!!"
Bscore += 1
walk(O,0)
Bscore()
if(Bscore >= 5)
world << "Blue team WINS!!!!"
Rscore = 0
Bscore = 0
return ..()
Exited(obj/O)
if(istype(O,/obj/soccerball))
walk(src,0)
net4
icon = 'Soccer.dmi'
icon_state = "net4"
Entered(obj/O)
if(istype(O,/obj/soccerball))//replace /mob/player with your player's mob type
O.loc=locate(11,10,7)//location inside the location the door leads to
world << "The Blue team scored!!"
Bscore += 1
Bscore()
walk(O,0)
if(Bscore >= 5)
world << "Blue team WINS!!!!"
Rscore = 0
Bscore = 0
return ..()
if anyone can help i would appriciate it!!
proc/Rscore(obj/rscoreboard/R)
This is how it's called:
Rscore()
That's your problem.