ID:262879
 
runtime error: undefined variable /turf/Stone_Path/var/screen
proc name: New (/obj/New)
usr: null
src: Crystal of Nobility (/obj/items/Nobility_Crystal)
call stack:
Crystal of Nobility (/obj/items/Nobility_Crystal): New(Stone Path (74,50,2) (/turf/Stone_Path))

This error occurs once for every object on the map. My problem is that i'm not realy sure how to find the bug the error is refering to.
It's refering to the New() proc in the turf/Stone_Path/var/screen.

We could help you if you posted the code that has to do with that.
In response to Pyro_dragons
Thats just it though, there is no code involving that. The objects are directly placed into the map. As a matter of fact i just checked, i have only 3 New() processes in the entire game and none of them have anything to do with the map, they are for my hud.
In response to Dark Krow
Post the part having to do with the turf then. Just what are you trying to do here? Why is it creating new turfs?
In response to Dark Krow
Use #define DEBUG, and it will give you the exact line of that code, and file. Then go into DM and hit Ctrl+G and enter in the line of it.
In response to Pyro_dragons
<code>mob proc/PowerRefresh() var/text_Power = num2text(Power) if(lentext(text_Power) == 1)text_Power = " [text_Power]" if(lentext(text_Power) == 2)text_Power = " [text_Power]" if(lentext(text_Power) == 3)text_Power = " [text_Power]" obj New(client/C) C.screen += src //this is the line DEBUG says is causing it ..() </code>
That is part of my Hud, it has nothing to do with the objects on the map.

<code>Nobility_Crystal {name = "Crystal of Nobility"; icon = 'Tiles.dmi'; icon_state = "waterC"}</code>
And this is one of the objects with the errors.
In response to Dark Krow
Of course it has something to with the objects on the map! That happens for ALL objects! Look where it's defined!

In response to Jp
Well how do i fix it? It cant be defined anywhere else, so is there a way to define it with out causing the errors?
In response to Dark Krow
You need to create a sub-type for screen objects that is only created for the HUD.
obj
screen
New(client/C)
src.screen_loc = "1,1" // Change this.
C.screen += src
..()


Now when creating it you need to do it like so:
mob
Login()
..()
new/obj/screen(src.client)


That way you're only creating the screen objects for players you know have a client (can't use client.screen without it!).
In response to Dark Krow
Never mind, im an idiot. I couldent see the obvios... Its fixed.. But thanks to all who tried to help.