ID:162905
 
THE 2 LINES do not have spaces in them on my code for some reason when i copy paste this code it shows 2 spaces there???

i been looking at this for 3 days please help
inconsistent indentation but i dont see it.....
trying to make script that gets usr in and out of a truck
PLEASE HELP ME!!
obj/oret1
name = "Old Ore Truck"
icon = 'driveables.dmi'
icon_state="oret1"
density = 1
verb/Get_In()
for(var/obj/oret1/G in get_step(src,src.dir))
src.loc=G.loc
src.icon=G.icon
src.icon_state=G.icon_state
G.Move(usr)
usr.int = 1
return

verb/Get_out()
set src in oview(1)
for(var/obj/oret1/T in get_step(src,src.dir))
T.loc=usr.loc
T.dir=usr.dir
usr.icon='player.dmi'
usr.int = 0
return
obj/oret1
name = "Old Ore Truck"
icon = 'driveables.dmi'
icon_state="oret1"
density = 1
verb/Get_In()
for(var/obj/oret1/G in get_step(src,src.dir))
src.loc=G.loc
src.icon=G.icon
src.icon_state=G.icon_state
G.Move(usr)
usr.int = 1
return

verb/Get_out()
set src in oview(1)
for(var/obj/oret1/T in get_step(src,src.dir))
T.loc=usr.loc
T.dir=usr.dir
usr.icon='player.dmi'
usr.int = 0
return


Try that. You had an extra space on the two lines after the first for.
Menton posted at the same time, but anyhow look for the tabs vs spaces as well.

So where I commented there was an indent problem, since they're not all lined up the same. Also make sure you hit ctrl T to make sure all of your spaces are tabs and not spaces, as that will get you too. Tabs will look like >> >> marks to the left of your indented text after you hit ctrl T in DM. If you try to just cut and paste out of this page you will likely get spaces instead of indents in your code so make sure you clean it up after a cut/paste

mike


obj/oret1
name = "Old Ore Truck"
icon = 'driveables.dmi'
icon_state="oret1"
density = 1
verb/Get_In()
for(var/obj/oret1/G in get_step(src,src.dir))
src.loc=G.loc
src.icon=G.icon // def an indent problem here fixed in this post version
src.icon_state=G.icon_state
G.Move(usr)
usr.int = 1
return

verb/Get_out()
set src in oview(1)
for(var/obj/oret1/T in get_step(src,src.dir))
T.loc=usr.loc
T.dir=usr.dir
usr.icon='player.dmi'
usr.int = 0
return