ID:166957
 
        proc/Create()
while(PixelX != 29 && PixelY != -12)
world<<"Debug: Starting pixel creation"
if(PixelX == 29)
world<<"Debug: Next Line"
PixelX = -11
PixelY -= 8
PixelX += 8
o = new /obj/White
o:pixel_x = PixelX
o:pixel_y = PixelY
// new o


Im pretty uneducated when it comes to object creation within DM. (Because im lazy) Im trying to have it fill up a square with 4x4 blocks, without me having to place them. But this neither generates blocks, nor a viable solution. Im pretty sure it has something todo with the "o" part of it :P
o = new /obj/White

from what I can see in your code you dont set o as a var
so

var/obj/o = new/obj/White

and you have not placed it on the map or the screen
In response to Zmadpeter
Zmadpeter wrote:
o = new /obj/White

from what I can see in your code you dont set o as a var
so

var/obj/o = new/obj/White

and you have not placed it on the map or the screen

    Generator
icon='Icons.dmi'
icon_state="Black"

var/PixelX = -11
var/PixelY = 12
proc/Create()
while(PixelX != 29 && PixelY != -12)
world<<"Debug: Starting pixel creation"
if(PixelX == 29)
world<<"Debug: Next Line"
PixelX = -11
PixelY -= 8
PixelX += 8
var/obj/o = new /obj/White
o.pixel_x = PixelX
o.pixel_y = PixelY
new o

With, "new o", I get this runtime error
runtime error: Cannot create objects of type /obj/White.
proc name: Create (/obj/Generator/proc/Create)
usr: Strawgate (/mob)
src: Generator (/obj/Generator)
call stack:
Generator (/obj/Generator): Create()
Strawgate (/mob): Start()
Debug: Starting pixel creation


Without "new o", I get this.
Debug: Starting pixel creation
Debug: Starting pixel creation
Debug: Starting pixel creation
Debug: Starting pixel creation
Debug: Starting pixel creation

but nothing appears :O
In response to Strawgate
o isn't given a location.
In response to Jp
It looks like its putting it into the variable, but not actually creating it.


Jp wrote:
o isn't given a location.
var/global/PixelX = -11
var/global/PixelY = 12
obj
White
icon='Icons.dmi'
icon_state="White"
New()
world<<"IM ALIVE"
Generator
icon='Icons.dmi'
icon_state="Black"
// var/PixelX = -11
// var/PixelY = 12
proc/Create()
while(global.PixelY != -12)
world<<"Debug: Starting pixel creation"
if(global.PixelX == 29)
world<<"Debug: Next Line"
global.PixelX = -11
global.PixelY -= 8
// var/obj/o = new /obj/White
var/obj/White/o = new(src)
o.pixel_x = global.PixelX
o.pixel_y = global.PixelY
global.PixelX += 8
o.loc = locate(src)
// new o

Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
Debug: Next Line
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
Debug: Next Line
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
IM ALIVE
Debug: Starting pixel creation
Debug: Next Line
IM ALIVE