ID:157839
 
So i've reached chapter 10 in the guide and my list is bugging up. I don't know why because it seems it is directly out of the book.

var/objects[0]

world/New()
var/T
for(T in typesof(/obj,/mob))
objects += new T
mob/DM
verb/create(0 in objects)
new 0:type(usr)


Iconning.dm:247:error: bad argument definition
Iconning.dm:247:error: 0: expected end of statement
Iconning.dm:247:error: expected expression



client/Center()
var/obj/0
var/obj/Last0

for(0 in usr.loc) Last0 = 0
if(Last0)//top most obj
Last0.Move(usr)

Iconning.dm:260:error: Also: expected end of statement
Iconning.dm:260:error: =: expected end of statement
Iconning.dm:260:error: missing left-hand argument to =


mob/wolfman
verb/sniff()
var/A = usr.loc

//loop trough usrs contents until u hit area
while(A && !istype(A,/area))
A = A:loc
usr << "You smell:"
var/mob/M
for(M in A)
usr << "\a [M]"


Iconning.dm:272:error: A: duplicate definition
Iconning.dm:272:error: A: duplicate definition
Iconning.dm:272:error: /area: duplicate definition
Iconning.dm:272:error: : duplicate definition
Iconning.dm:272:error: &&: instruction not allowed here
Iconning.dm:272:error: : empty type name (indentation error?)
Iconning.dm:273:error: A: undefined var
Iconning.dm:273:error: A/:/loc: undefined var
Iconning.dm:273:error: : empty type name (indentation error?)
Iconning.dm:274:error: usr: duplicate definition
Iconning.dm:274:error: "You smell:": duplicate definition
Iconning.dm:274:error: <<: instruction not allowed here
Iconning.dm:276:error: M: duplicate definition
Iconning.dm:276:error: A: duplicate definition
Iconning.dm:276:error: in: instruction not allowed here
Iconning.dm:276:error: : empty type name (indentation error?)
Iconning.dm:277:error: usr: duplicate definition
Iconning.dm:277:error: M: value not allowed here
Iconning.dm:277:error: : empty type name (indentation error?)
Iconning.dm:277:error: text"\a []": value not allowed here
Iconning.dm:277:error: : duplicate definition
Iconning.dm:277:error: <<: instruction not allowed here
Iconning.dm:277:error: : empty type name (indentation error?)
Iconning.dm:269:warning: A: variable defined but not used
Are those zeroes? You can't use a number as a variable name. Maybe you misread the letter "O" as a "0" and have been trying to use that?

The last snippet looks like an issue of indentation; try indenting everything after your comment.

var/list/objects=new() //Must add it as a list, as well as actually create it
>
> world/New()
> var/T
> for(T in typesof(/obj,/mob))
> objects += new T
> mob/DM
> verb/create(var/O in objects) //You must define what O is
> var/New_Item=new O //I usually dont use new like this, but I believe it will work
usr<<"[New_Item] Created" //For debuggin purposes
>
>
> Iconning.dm:247:error: bad argument definition
> Iconning.dm:247:error: 0: expected end of statement
> Iconning.dm:247:error: expected expression
>
>

client/Center()
> var/obj/O //0 =/= O
> var/obj/Last0 //I dont really know what you wanted with, so Ima let someone else fix it
>
> for(O in usr.loc) Last0 = O
> if(Last0)//top most obj
> Last0.Move(usr)
>
> Iconning.dm:260:error: Also: expected end of statement
> Iconning.dm:260:error: =: expected end of statement
> Iconning.dm:260:error: missing left-hand argument to =


I g2g, I might fix the rest later
In response to Abrax
I figure out how to fix all of it now. Thank you