wall
wooden_wall
icon = 'wooden wall.dmi'
I know I might sound stupid but it keep saying undefined var when I compile it. I need to be able to make an actual wall and the same goes with objects.
ID:139377
Jan 29 2011, 5:22 pm (Edited on Jan 29 2011, 5:27 pm)
|
|
Code:
wall I know I might sound stupid but it keep saying undefined var when I compile it. I need to be able to make an actual wall and the same goes with objects. |
In response to Kaiochao
|
|
Can you give me the coding because I am not sure what you mean. And also I did learn how to work the turf just not the objects and the walls. This hasn't happened ever until now. Maybe Byond updated the code.
|
In response to Bigmnm
|
|
:P Simple mistake you have here. You simply forgot to either make this an obj or turf.
obj // Change this to turf if you'd like |
In response to Gtgoku55
|
|
You really didn't need to gave him the sheet..
I've read multiple topics of him with things you should know if you read the reference and the DM guide. Bigmnm, I would like to ask if you could read the DM guide again, it's really going to help you a lot. DM Guide: http://www.byond.com/docs/guide/ Reference: http://www.byond.com/docs/ref/ |
In response to Gtgoku55
|
|
Your indentations are off.
|
In response to Darker Legends
|
|
Darker Legends wrote:
Your indentations are off. There is no need for indentations to be on in code showing. Developers can themselves do it. |
In response to Hashir
|
|
Any reason you made this useless comment? What if the user was trying to copy and paste it, just to find out it's not working?
|
In response to Darker Legends
|
|
Darker Legends wrote:
What if the user was trying to copy and paste it Then the user should stop copy/pasting code into the project. It is not the purpose of this forum for us to reply with code that can be pasted in to solve the problem, and much of the time you should expect replies to not work if pasted directly. Still, I agree with you that the comment was useless. The original poster is obviously at the very beginning of the learning process, so you don't want to give code examples which themselves have problems in them, or you will just confuse the person more and give them bad habits. |
In response to Darker Legends
|
|
Darker Legends wrote:
Your indentations are off. My indentations are off? Worked fine in my code. |
In response to Gtgoku55
|
|
Yes.
obj // Change this to turf if you'd like The above code is yours you're giving every turf the 'woodenwall' icon. obj // Change this to turf if you'd like |
In response to Darker Legends
|
|
In reply to Gtgoku55:
Using the space bar to form indentations is a terrible habit to form in coding. While it may work, it will start to create broken code bits and may even bog down your projects. Don't use the spacebar unless it's called for. Not to mention, giving it out in the help section may form the habits for other people. It most likely won't even work in their project when they compile. |
In response to Raimo
|
|
I have and am. So please stop mentioning it. I try to use it to the best of my abilities but not always am I going to fully understand it. Also, I'm glad he did give me the "sheet".
|
In response to Darker Legends
|
|
The code worked fine, so to clear that up. The indention was perfect.
|
In response to Gtgoku55
|
|
Appearently the indention is off. It worked at first but then I had to re-indent.
|
In response to Bigmnm
|
|
Whether it 'worked' doesn't really matter. The fact that something compiled successfully (or even that it seems to work fine) doesn't mean that it's done right; it only means that the code didn't have compilation errors. It may still not pull off the desired behavior and effect and/or have bugs/runtime errors and logical errors.
In this case the "issue" that was mentioned with the indentation caused every /obj/wall object to have the woodenwall.dmi icon instead of only the /obj/wall/woodenwall object, which is what would be intended. The code will generally compile and run just fine, it just won't create the exact intended effect. |
In response to Bigmnm
|
|
You might have read it, I wont deny that, but that doesn't mean you do completly understand some parts aswell. My point is, if you read the DM guide, you should of known how to define an obj, turf, mob, atom or whatever.
|
2. Like your other post you've learned nothing from, you need to indent your icon declaration for a wooden_wall so that it's actually for the wooden_wall, and not the base "wall".