ID:142201
 
Code:
var/scenecount = 50
world/New()
var/I//I
I = I+I//used to suppress unused var warnings
for(I<scenecount)//if I less than scenery count variable
var/Random = rand(1,100)//random generation
if(Random < 50)//if less than 50
var/obj/Trees/A = new //create tree
reXY //for re calling the XY randomize
var/X = rand(1,50) //makes trees X
var/Y = rand(1,50) //makes trees Y
for(var/turf/Grass/G) //Run through all Grasses in world
if(G.loc == locate(X,Y,2)) //checks if the loc is the New loc
for(var/obj/O) //runs through all OBJs in world
if(G.loc == O.loc) //checks if turf loc is obj loc
goto reXY //if so goto XY
A.loc = locate(X,Y,2) //if not change the scenery XY to new XY
I++ //make sure there is no infinite loop
else if(Random >= 50 && Random < 80)//if more than or eqaul to 50
var/obj/Hill/A = new //create Hill
reXY //for re calling the XY randomize
var/X = rand(1,50) //makes hills X
var/Y = rand(1,50) //makes hills Y
for(var/turf/Grass/G) //Run through all Grasses in world
if(G.loc == locate(X,Y,2)) //checks if the loc is the New loc
for(var/obj/O) //runs through all OBJs in world
if(G.loc == O.loc) //checks if turf loc is obj loc
goto reXY //if so goto XY
A.loc = locate(X,Y,2) //if not change the scenery XY to new XY
I++ //make sure there is no infinite loop
else if(Random >= 80)//if more than or eqaul to 50
var/obj/Mountain/A = new //create Mountain
reXY //for re calling the XY randomize
var/X = rand(1,50) //makes mountains X
var/Y = rand(1,50) //makes mountains Y
for(var/turf/Grass/G) //Run through all Grasses in world
if(G.loc == locate(X,Y,2)) //checks if the loc is the New loc
for(var/obj/O) //runs through all OBJs in world
if(G.loc == O.loc) //checks if turf loc is obj loc
goto reXY //if so goto XY
A.loc = locate(X,Y,2) //if not change the scenery XY to new XY
I++ //make sure there is no infinite loop


Problem description:

Nothing is created on the map when the proc runs

I have all of the OBJs created under the correct types and get no errors at either run time or compile, the code just doesnt run.

obj
Mountain
icon = 'Turf.dmi'
icon_state = "Mountain"
Hill
icon = 'Turf.dmi'
icon_state = "Hill"
Trees
icon = 'Turf.dmi'
icon_state = "Trees
//more added later


Srry if the code is messy (if there is an easyer way to do this please post as well)
Try changing to a proc and giving the host a verb to call the proc, and see if that works
In response to Juan666
Tried it, didn't work.

edit
I did get the proc to work
there was somthing wrong with the for(I>scenecount) but im not sure what