ID:738185
 
(See the best response by Robertbanks2.)
mob
icon = 'person.dmi'
var
hp = 10
str = 5
def = 2

turf
grass
icon = 'person.dm'
icon_state = "grass"

turf
water
icon = 'person.dmi'
icon_state = "water"
density = 1


world
name = "My First Game."
turf = /turf/grass





is there anything wrong with this code because it says "due to compilation errors the object tree cannot be trusted for map generation." I've done CTRL+K and it says error unable to open "world.dmm"


I'd really like some help on this because I've seen people talking about this but I can't find a solution :/
FYI, when providing code on the forums, place the code between the <dm></dm> tags. I edited your post and provided the tags for you, though.
I believe this error stems from indentation issues.

Based on your code, it looks like you're using tab twice for indentation. Try tabbing only once.
world
name = "My First Game."
turf = /turf/grass

mob
icon = 'person.dmi'
var
hp = 10
str = 5
def = 2

turf
icon = 'person.dmi'
grass
icon_state = "grass"

water
icon_state = "water"
density = 1
Best response
How much white space you have isn't relevant to the compiler as long as it's consistent. If it was an indentation issue, the compiler would spit out an inconsistent indentation error.
You are correct, Robert.


As with answering RogerThis' question: I did some searching and apparently, you must have some errors in your code. Therefore, compile (CTRL+K) and fix the compilation errors displayed. I realize that you've done this, but are there any other errors being displayed besides: unable to open world.dmm?
Nope that's the only error, thanks for the help.
You may want to take a closer look at this part of the code you posted:
turf
grass
icon = 'person.dm' //should be 'person.dmi'
icon_state = "grass"
"due to compilation errors the object tree cannot be trusted for map generation." usually means an object placed on the map has had its path changed in the code.
In response to Suicide Shifter
Suicide Shifter wrote:
"due to compilation errors the object tree cannot be trusted for map generation." usually means an object placed on the map has had its path changed in the code.

That's actually a different error, and it pops up a dialog to let you change the path. That was my first thought as well, so I tested it, but to no avail.