ID:147889
 
I'm just trying to add the text "Shipyard" to a list I defined in the object. Any ideas what the solution would be??

The Code:
menu1 += "Shipyard"

The Errors:
obj.dm:873:error:menu1:duplicate definition
obj.dm:873:error:"Shipyard":duplicate definition
obj.dm:873:error:+= :instruction not allowed here
Nothing in that one line seems to be causing any problems...

What are the surrounding lines of code? And where are you trying to do this? Because it can only be done within a proc... I believe that indentation errors might cause those errors as well, so check that, too...
In response to SuperSaiyanGokuX
hmm proc may be the case.. so I just scrub where I had placed the earlier list and just duplicated it 4 times instead with Shipyard already in there. Problem solved.. but I would of thought I could of just added it in there without problems. DM is always coming back to bite me in my simple mind!!

LJR
obj.dm:873:error:+= :instruction not allowed here

This leads me to believe you have this section of code outside a proc/verb or you have your indentation messed up.
In response to LordJR
If you are trying to add it into the default prototype's list (essentially, adding it at compiletime instead of runtime) then you will want to simply have it as part of the list to begin with.

var/list=list("text string")

There is a big difference between compiletime code and runtime code. All of your object types that you have defined are merely prototypes and are figured at compiletime, and they are all hard-coded and shall not change aftorwords. (Or constant, if you are familiar with that term. The compiler deals with constants to create the program.) At runtime the only thing you have control over are the functions (procs) that continually execute throughout the lifetime of your active program. These functions will access many of the constant settings that have been set at compiletime, and some of them (variables) are not even constant during runtime and can be changed.

In short, the compiler deals with constants. If you want something to be equal to something else at compile time then state that where you have it defined.

If you want to have extra control over the compiler, then use the compiler directives (those things that start with a '#'), such as #elif, #else, #endif, #if, #ifdef and #ifndef. Those can be handy for keeping code in your file and having the compiler ignore some areas while compiling others giving it more flexibility.
In response to Theodis
Theodis wrote:
obj.dm:873:error:+= :instruction not allowed here

This leads me to believe you have this section of code outside a proc/verb or you have your indentation messed up.

Yes someone mentioned that to me. I guess the ONLY place this can happen is inside a proc or a verb??? If so, I've learned something.
In response to LordJR
Yes someone mentioned that to me. I guess the ONLY place this can happen is inside a proc or a verb??? If so, I've learned something.

Yeah outside of verbs and procs things can only be initialized to constant values. Anything that does something other than that must happin within a verb or proc.