ID:139151
 
Hello,I'm new here and the only coding experience I have is with TI-83's. I've read a little of the guide,but I can't grasp what the basic structure of the code should be like. And I dont have access to anything that needs to be downloaded. I tried the TI-83 structure and got more errors than I had lines of code.(I said structure not syntax;I knew that wouldn't work.) That being said,could some one please help me understand the basic structure of DM code? (Sorry if this is the wrong forum,I took my best guess.)Thank you!
Structure as in inheritance tree? or something else...
You should read the blue book, i just started, its pretty good. The first two chapters go over what you want to know. I left the link at the bottom but if you're too lazy to read it i guess i could try to sum it up. They liken the structure to a tree. So basically you start at the root of the tree(or the base), then each branch has its own specific properties too. For example:

obj // base of the tree
sword // specific branch of the tree
icon = 'sword.dmi' // specific property to that branch
apple // another branch of the tree
icon = 'apple.dmi' // specific property to that branch

mob // base of another tree
Gorilla // specific branch of the tree
icon = 'Gorilla.dmi' //specific property
name = "George" // another specific property

turf // base of tree
name = "All these be turfs" // specific property to what it belongs to. It belongs to the entire tree.
Grass // branch of tree
icon = 'Grass.dmi' // specific to Grass


Link to blue book.
http://www.byond.com/docs/guide/
Structure IS syntax, bro.

Read the blue book. Look through code examples and libraries.
In response to Turles (#2)
hi i just started coding as well, im trying to get my tree icon to work with my code..ill paste it

turf
floor
icon = 'floor.dmi'
wall
icon = 'wall.dmi'
density = 1
mob
icon = 'player.dmi'

im trying to add it to the turf.
In response to Stonah_panda (#4)
If you wanted to add a tree, then you just create a tree turf like how you created floor and wall. Then set the icon of it to the name of the tree icon file.

So it'd be like

turf
floor
icon = 'floor.dmi'
wall
icon = 'wall.dmi'
tree
icon = 'tree.dmi'
In response to Turles (#5)
i did that but it says it doesnt trust the tree obj

this is what i got:

tree
icon = 'tree.dmi'
density = 1
In response to Stonah_panda (#6)
I think it says that when you go into the map editor?

Its because there is errors in your code. It doesn't let you edit map if there are errors.

Try compiling, it will tell you if there are any errors and will describe them. To compile just click build on the top and then compile.
I started out on the TI-83 also, (about 8 years ago). What kind of stuff did you make?

The thing that helped me the most was the Blue Book. http://www.byond.com/docs/guide/ (I would download the PDF, it is easier to read than the online version)
It is a bit out of date now but still has the basics.

From there just try to make some of the same things you did on the calculator. Simple text input and display stuff-just to make sure you have a handle on the basics. Maybe do a unit conversion program or something. The syntax of DM is nothing like TI-83 BASIC or ASM. But, it is simple in its own way.

If you have any questions on how to do something specific, I am sure the community can help. (Just make sure to try it yourself first)