ID:142388
 
Code:I coded a test world in other words a begining of a game.
The Whole Source


Problem description:It says i have errors in different places when i didnt have them before it says i have an error with stuff like turf and objs

What are the errors?
In response to Kaiochao
coding\Turfs.dm:1:error::invalid expression

turf
icon='icons/Turfs1.dmi'
tree
icon_state="tree"
density=1
New()
.=..()
//create the top part of the tree
overlays+=image(icon=src.icon,icon_state="tree",dir=NORTH,pixel_y=32,layer=FLY_LAYER)
floor
icon_state="floor"
grass
icon_state="grass"
sand
icon_state="sand"
wall1
icon_state="1"
wall2
icon_state="2"
wall3
icon_state="3"
density = 1
wall4
icon_state="4"
density = 1
wall5
icon_state="5"
density = 1
wall6
icon_state="6"
density = 1
wall7
icon_state="7"
density = 1
wall8
icon_state="8"
layer = FLY_LAYER + 1
wall9
icon_state="9"
layer = FLY_LAYER + 1
wall10
icon_state="10"
density = 1
wall11
icon_state="11"
density = 1
wall12
icon_state="12"
layer = FLY_LAYER + 1
wall13
icon_state="13"
layer = FLY_LAYER + 1
wall14
icon_state="14"
layer = FLY_LAYER + 1
wall15
icon_state="15"
layer = FLY_LAYER + 1


Thats the whole Turf File
In response to Chrislee123
Check the code file that is before turfs.dm in the list for errors.
In response to Chrislee123
Show the last few lines in a file before that.

Sometimes BYOND points the error line a line ahead.
In response to Kaioken
Thats the file above it

File Name = Objs

obj
icon='icons/objs1.dmi'
density = 1
proc
Trigger(atom/movable/A,exit=0) return 1
Triggered(atom/movable/A,exit=0)

table
icon_state="table"
New()
.=..()
//automatically sets the tables' direction based on tables near it (primitive autojoining)
spawn
var
turf/T= get_step(src,EAST)
state=0
if(T && (locate(/obj/table) in T)) state|=EAST
T= get_step(src,WEST)
if(T && (locate(/obj/table) in T)) state|=WEST

if(state&EAST) if(!(state&WEST)) dir=WEST
else if(state&WEST) dir=EAST
else dir=NORTH
Trigger(mob/M,exit=0)
if(!istype(M)) return 1 //non-mobs are usually small enough to go over a table

if(exit && M.dir==NORTH) return 0
if(!exit && M.dir==SOUTH) return 0
return 1
bed
icon_state="bed"
pixel_y=8
New()
.=..()
overlays+=image(icon=src.icon,icon_state="bed",dir=NORTH,pixel_y=32)
overlays+=image(icon=src.icon,icon_state="bed",dir=EAST,pixel_y=32,layer=FLY_LAYER)
overlays+=image(icon=src.icon,icon_state="bed",dir=WEST,layer=FLY_LAYER)
Trigger(mob/M,exit=0)
if(!istype(M)) return 1 //non-mobs are usually small enough to go over a table

if(exit && M.dir==NORTH) return 0
if(!exit && M.dir==SOUTH) return 0
return 1
bookcase
icon_state="bookcase_large"
density=1
New()
.=..()
overlays+=image(icon=src.icon,icon_state="bookcase_large",dir=NORTH,pixel_y=32,layer=FLY_LAYER)
uber_bookcase
icon_state="uber_bookcase"
density=1
New()
.=..()
overlays+=image(icon=src.icon,icon_state="uber_bookcase",dir=NORTH,pixel_x=32)
overlays+=image(icon=src.icon,icon_state="uber_bookcase",dir=EAST,pixel_y=32,layer=FLY_LAYER)
overlays+=image(icon=src.icon,icon_state="uber_bookcase",dir=WEST,pixel_y=32,pixel_x=32,layer=FLY_LAYER)
Unmined_Rock
icon_state="Unmined Rock"
density=1
Click()
if(get_dist(usr,src) <= 1)//makes it so you have to be within one tile from the mountain to mine
usr.random=rand(1,5)///this declears the chance of getting there are 5 you can change it to have a harder chance of getting stuff
if(usr.random==1)
usr<<"You mined a Stone!!!"
var/obj/Low_Nequadrah/S = new/obj/Low_Nequadrah
S.loc=usr.loc
del(src)
if(usr.random==2)
var/obj/Med_Nequadrah/S = new/obj/Med_Nequadrah
S.loc=usr.loc
del(src)
if(usr.random==3)
var/obj/High_Nequadrah/S = new/obj/High_Nequadrah
S.loc=usr.loc
del(src)
if(usr.random>=4)
usr<<"You mine and found some dirt bleh is worthless"
del(src)
else
return
Low_Nequadrah
icon_state="Low Neq"
density=0
DblClick()
if(src.loc==usr)
src.loc=locate(usr.x,usr.y-1,usr.z)
else
set src in oview(1)
src.loc = usr
usr<<"You picked up some [src]"
Med_Nequadrah
icon_state="Med Neq"
density=0
DblClick()
if(src.loc==usr)
src.loc=locate(usr.x,usr.y-1,usr.z)
else
set src in oview(1)
src.loc = usr
usr<<"You picked up some [src]"
High_Nequadrah
icon_state="High Neq"
density=0
DblClick()
if(src.loc==usr)
src.loc=locate(usr.x,usr.y-1,usr.z)
else
set src in oview(1)
src.loc = usr
usr<<"You picked up some [src]"
Staff
name = "Staff Weapon"
icon_state = "Staff"
desc = "A Jaffa's Weapon"
DblClick()
if(src.loc==usr)
src.loc=locate(usr.x,usr.y-1,usr.z)
else
set src in oview(1)
src.loc = usr
usr<<"You picked up a [src]"
verb
Equip()
if(src.loc==usr)
if(usr.equip==1)
usr.equip = 0
usr<<"You unequip yourself with a [src]"
if(usr.equip==0)
usr.equip = 1
usr<<"You equip yourself with a [src]"
Tollen_Device
name = "Tollan Device"
icon_state = "Staff"
desc = "A Tollen Device That allows you to walk through walls for short spaces of times"
verb
Use()
usr.density=0
spawn(5)
usr.density=1
spawn(5)
In response to Chrislee123
Other than very bad code, I see no invalid expressions
In response to Kaiochao
Exactly and my coding aint that bad but anyway what do u suggest cause i cant run it or access the map cause its errored
In response to Kaiochao
That may be due to his incorrect use of spawn() (the error should also generally be at the end of that file, because it pointed him to the next file), which tends to sometimes compile (I consider this a bug) but I guess it properly throws an invalid expression error when it's in the end of a proc.

@Chrislee: No, I'm sorry, but you do code pretty horribly. Your spawn() usage is bad. You also clearly don't really know how to use spawn() at all. Look it up in the DM Reference. It is meant to have a block of code belonging (eg: indented) to it, like an if() statement does:
//proper use of spawn statement
spawn(4)
//*code*
world << "hi"

spawn() world << "sup"

//bad use of spawn statement
spawn world << "hi"

spawn()
world << "hi"
In response to Chrislee123
Chrislee123 wrote:
>   Tollen_Device
> name = "Tollan Device"
> icon_state = "Staff"
> desc = "A Tollen Device That allows you to walk through walls for short spaces of times"
> verb
> Use()
> usr.density=0
> spawn(5)
> usr.density=1
> spawn(5)
>


Replace the first spawn() call with a call to the sleep() proc, and just delete the second one, since it doesn't do anything.