ID:155603
 
After my code got a little longer, loads of warnings started appear due to not used vars, which are used in object making. What would be best way to get rid of these warnings besides just deleting vars?

Example of warnings-giving code:
var/obj/stuff= new(src)
Martys1103 wrote:
After my code got a little longer, loads of warnings started appear due to not used vars, which are used in object making. What would be best way to get rid of these warnings besides just deleting vars?

Example of warnings-giving code:
> var/obj/stuff= new(src)
>

In your example, you're initializing an instance that you can modify (like being able to set stuff.density = TRUE, etc). To simply generate new objs without the warning that variables are going unused, you would do...

new /obj(src)