ID:941806
 
Keywords: end, statement, turf
(See the best response by Albro1.)
Code:
turf

var/moveto_tag
woodfloor1
icon='woodfloor.dmi'
wall1
icon='wall1.dmi'
density=1
water
icon='water.dmi'
density=1
grass
icon='grass1.dmi'
nothing
icon='null.dmi'
door
icon='door.dmi'
density=0
door2
icon='door.dmi'
density=0
roof1
icon='roof1.dmi'
icon_state = "r1"
density = 1
roof2
icon='roof1.dmi'
icon_state = "r2"
density = 1
roof3
icon='roof1.dmi'
icon_state = "r3"
density = 1
roof4
icon='roof1.dmi'
icon_state = "r4"
density = 1
roof5
icon='roof1.dmi'
icon_state = "r5"
density = 1
roof6
icon='roof1.dmi'
icon_state = "r6"
density = 1
roof7
icon='roof1.dmi'
icon_state = "r7"
density = 1
roof8
icon='roof1.dmi'
icon_state = "r8"
density = 1
roof9
icon='roof1.dmi'
icon_state = "r9"
density = 1
rooftile
icon='roof1.dmi'
icon_state = "r10"
density = 1
dirtpave
icon='dirtpave.dmi'

mob/Login()
src.loc = locate(7,5,1)
maptext = "<b><text align=center><font color = blue>[src]</font color = blue></text align=center></b>"
add_hpbars()
world << "<b>[src]</b> just logged in!"
icon = 'drey.dmi'
icon_state = "walk"
frozen = FALSE
if(step_size == 16)
step_size = 8
else
step_size = 8
mob/verb/BuildWall()
set category = "Build" //It will be under a tab called Build
view() << "[usr] has just built a wall!" //Tells the people around you that you built something
new/turf/wall1(locate(usr.x,usr.y,usr.z)) //Finally, makes a wall where you are
mob/Logout()
world << "<b>[src] logged out!</b>"
del(src)
mob/npc/Test
icon = 'slime.dmi'
icon_state = "walk"
obj/Positivia
icon='Positivia.dmi'
obj/Attack
icon='Positivia.dmi'


Problem description:
i dont know what to do.
there seems to be no unwanted spaces and such. please help. it highlights line the with turf in it.
You have a lot of lines indented once too far in the bottom part of your code, after all the turf definitions.
ill try what you said. but ive been able to run for weeks with no problen even with the indents. and it highlight the first lin. ill try it.
it didnt work :(
this is the rest of my code.
/*
These are simple defaults for your project.
*/


#include <deadron/characterhandling>
#include <Forum_account/overlays>
client/base_num_characters_allowed = 3

world
hub = "TRiToN_DREyJA's.Legendofdrey" //sets the hub path so you may link it and publish
name = "The Legend Of Drey" //names your game. This will show in the top left of the window
version = 0.1 //current version
turf = /turf/grass
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

loop_checks=0
mob
verb
save_me()
// This demonstrates how to manually save the mob whenever you want.
src.client.base_SaveMob()
src << "\red You have been saved successfully!"
mob
var
Overlay/lightning
Overlay/aura
Logout()
save_me()
proc
charge()
if (charging == 1)
frozen = 1
if (energy == MaxEnergy)
if (icon_state == "charging")
lightning = overlay('maxki.dmi')
flick("maxenergy", src)
chargehp()
else
//nothing
else
icon_state = "charging"
energy +=1
sleep(1)
charge()
else
frozen = FALSE
if (icon_state == "charging")
icon_state = "walk"
else
icon_state = "walk"//nothing

chargehp()
if (charging == 1)
frozen = 1
if (hp == Maxhp)
if (icon_state == "charging")
aura = overlay('overlay1.dmi', "charging")
flick("maxenergy", src)
charging = 0
charge()
else
//nothing
else
icon_state = "charging"
hp +=1
sleep(1)
chargehp()
else
frozen = FALSE
if (icon_state == "charging")
icon_state = "walk"
else
icon_state = "walk"//nothing
verb
c1()
charging = 1
charge()
c2()
charging = 0
charge()
proc
Respawn()
sleep(25)
frozen = FALSE
src.loc = locate(7,5,1)
icon_state = "walk"
step_size = 8
running = 0
proc
DeathCheck(mob/M in oview(1), mob/Owner)
if(src.hp<=0)
src.updateHealth()
icon_state = "koed"
src.frozen = 1
world << ("<b>[src]</b><font color = red> was killed by</font color = red><b> [usr]</b>")
src.hp = src.Maxhp
usr.EXP += 50
usr.Levelup()
src.Respawn()
src.updateHealth()
else
//nothin
//nothin
npc
Test
step_size = 5
defense = 150
hp = 100
Maxhp = 100
energy = 0
strength = 600
icon = 'slime.dmi'
icon_state = "walk"
New()
..()
. = ..()
spawn() src.AI_move()
add_hpbars()
updateHealth()
// perform whatever happens by default with the New() proc
//fdg
icon = 'slime.dmi'
icon_state = "walk"

//dononth
verb
Run()
if (running == 0)
if (icon_state == "Sprint")
icon_state = "walk"
if (step_size == 16)
step_size -=8
else
//do nothing
else
icon_state = "Sprint"
step_size += 8

Run1()
running = 0
Run()
Run2()
running = 1
Run()

Block()
if (blocking == 0)
step_size = 8
if (icon_state == "Guard")
icon_state = "walk"
if (defense == guardd)
defense = d2
else
//do nothing
else
step_size = 1
icon_state = "Guard"
defense = guardd

B1()
blocking = 0
Block()
B2()
blocking = 1
Block()

verb
Friend()
set src in oview(7) //when you get close the Get verb shows up
src.Move(usr) //puts it in the inventory
usr << "<b>You Added [src] as a friend!!<b>" //shows the user in text his actions


proc
Levelup()
if (EXP == MaxEXP)
MaxEXP +=2500
EXP = 0
level += 1
defense += 50
d2 += 50
strength += 50
Maxhp += 50
guardd += 50
MaxEnergy += 100
kamedamage += rand(1, 200)
world << "<b>[src]</b><font color = green> has leveled up and is now level [usr.level]!!!</font color = green>"
else
//nothing//

Stat() //starts a stat panel
statpanel("Stats") //names the panel stats
stat("HP:",hp) //stat makes the new stat
stat("EXP:",EXP)
stat("Exp to next:",MaxEXP)
stat("Level:",level)
stat("Defense:",defense)
stat("Strength:",strength)
stat("Energy:",energy)
statpanel("Inventory") //MAkes a new stat panel called inventory

stat(contents) //this is where the contents will go

statpanel("Friends")

stat(contents)

verb
Attack(mob/M in oview(1))
icon_state = "punch1"
flick("HitStun", M)
view() << "[usr] has attacked [M]!" // Anyone is sight of you will hear see this.
var/damage = usr.strength - M.defense
if (damage <= 0)
damage = 0
src << "You are too weak to attack [M]!" //The damage done to M will be randomly chosen from 1 to 5.
M.hp -= damage
M.DeathCheck()
M.updateHealth()
sleep(5)
icon_state = "walk"
blocking = 0
Block()
var
hp = 500
defense = 300
energy = 500
strength = 200
level = 1
EXP = 0
MaxEXP = 2500
equip = 0
running = 0
MaxEnergy = 500
attacking = 0
blocking = 0
Maxhp = 500
guardd = 2000
d2 = 300
charging = 0
kamedamage = 400
blastdamage = 320
verb
say(T as text)
world << "<b>[src]:</b><font color = blue> [T]</font color = blue>"

step_size = 8
obj
verb
Get()
set category=null //this makes sure it will be a hidden verb. Just right click to use the verb
set src in oview(1) //when you get close the Get verb shows up
src.Move(usr) //puts it in the inventory
usr << "<b>You picked up [src]!<b>" //shows the user in text his actions
Drop()
set category=null
set src in usr //tells the verb where the item is
src.Move(usr.loc) //takes it out of the inventory and drops it where you are standing
usr << "<b>You dropped your [src]!<b>"
verb
Equip()
set category=null
set src in usr
if(usr.equip >= 1)
usr << "[src.name] is already equipped" //instead of typing the name just copy and paste this into where is needed.src.name will show Sword is already equiped!
else
usr.equip += 1
suffix += "- Equipped " //Makes the suffix appear beside it in the inventory tab
usr << "<b>You equip your [src.name].<b>"
Un_Equip()
set category=null
if(usr.equip == 0)
usr << "You don't have anything equipped"
else
suffix = "" //Note*This only works if you have 1 suffix
usr.equip -= 1
usr << "<b>You place your [src.name] back into your inventory.<b>"


DBZ_Techniques
icon = 'Positivia.dmi'
parent_type = /obj // Parent type is objects, yay

var
charge_speed // how long it'll take to charge
power_gain // how much power is gained
damage_power = 0 // your damage variable is important
Kamehameha
icon_state = "aas"
charge_speed = 3 // set to 3 as requested via forums
power_gain = 4 // set to 4 as requested via forums

//Test verbs below so you can see it works. I just didn't feel like typing up a beam system at 2 a.m. besides, there are some good examples
//of beam systems on BYOND.



mob/proc/AI_move()
//note: you will probably want to add in cancelling if the detected\
mob isn't a player.

for() //create an infinite loop. procs automatically stop anyway \
when their 'src' is deleted, so no need to check if its valid.

var/mob/M = locate() in oview(src) //find a mob in oview and store\
it to M

if(M) //if a mob was found
walk_to(src,M,0,0)
src.npcattack(M)
else
//walk to the detected mob until in range of\
1 tile from it, at speed of 1 step per tick

//do other stuff here if you want... //if a mob wasn't detected
walk_rand(src,2) //walk randomly until another walk() function \
happens on 'src', at a speed of 1 step per 2 ticks

sleep(10)

mob/proc/npcattack(mob/M in oview(0))
if(get_dist(M,src)==1)
src.Attack(M)

turf/door
var/destination = "tag1"
Entered(atom/movable/A)
if(ismob(A))
var/turf/dest = locate(destination)
if(dest)
world << "[A] has left the spawn area."
A.Move(dest)
turf/door2
var/destination1 = "tag2"
Entered(atom/movable/A)
if(ismob(A))
var/turf/dest1 = locate(destination1)
if(dest1)
world << "[A] has entered the spawn area."
A.Move(dest1)


mob
proc
updateHealth()
var/percent=round(hp/Maxhp*30,1)
if(percent>100) percent=100
if(percent<0) percent=0
overlays=list()
//What you need to do is update all your overlays by re-adding them so you can add the new set below... My prefered method to this is to make a different list with all the other overlays and do overlays+=P_Overlays or whever your list is called.
overlays += image('healthbar.dmi',icon_state="[percent]", pixel_y = 32)
..()
proc/add_hpbars()
usr.overlays += /obj/hudMeters/health_01
src.updateHealth()
obj
hudMeters
health_01
icon='healthbar.dmi'
icon_state="30"
layer = MOB_LAYER








obj/projectile
icon = 'projectiles.dmi'
density = 1
var
delay = 0.8 //the delay between each movement step.
length=0 //how many steps the proj. is allowed to make before being deleted
dmg //damage/damage-multiplier etc...whatever you wish.
splash //to pass on to an explosion proc, if wanted. (explosion proc not included here. but those are easy >_>)
mob/owner
Overlay/power //the mob that fired the proj.
New(_loc,mob/_owner) /*called when the object is created.
new() proc passes arguments to New(). loc argument is already
handled by default before New() is called.
If you have overrided New() for /obj's (or the types they're derived
from), you will need to add a '.==.()' or 'return ..()'
(the latter at the end) for it to work.*/

if(_owner) //if an owner was specified...
//src.dmg = max(_owner.Level * src.dmg,1) //dynamic dmg example
//src.length = max(round(_owner.MaxMP / src.length),5) //dynamic length example
src.dir = _owner.dir
if(!src.loc) src.loc = get_step(_owner,_owner.dir) //if loc isn't set, initialize it.
src.owner = _owner //set the owner var to the argument passed
Move()
src.length-- //remove 1 from src.length
if(!src.length) del src //if length is 0, delete the beam
return ..() //otherwise, do default behaviour
Bump(atom/O)
if(istype(O,/obj/))
var/obj/a=O
src.loc=a.loc
if(a.destructable)
view() << "[usr] just broke through a wall with their [src]!!!"
del a
else
del src
if(ismob(O))
O:hp -= src.dmg
if (O:hp <= 0)
O:updateHealth()
O:icon_state = "koed"
O:frozen = 1
O:hp = O:Maxhp
src.owner.EXP += 50
O:Respawn()
O:updateHealth()
world << "[src.owner] has killed [O:name] with \his [src]!"
if (src.owner.EXP == src.owner.MaxEXP)
src.owner.MaxEXP +=2500
src.owner.EXP = 0
src.owner.level += 1
src.owner.defense += 50
src.owner.d2 += 50
src.owner.strength += 50
src.owner.Maxhp += 50
src.owner.guardd += 50
src.owner.MaxEnergy += 100
src.owner.kamedamage += rand(1, 200)
if (!splash)
sleep(2)
del src
src.owner.frozen = FALSE
..()//if O is a mob...
//O.TakeDamage(src.damage,src.owner) //if you have some custom take-damage proc
//O:HP = max(O:HP-src.dmg,0)
//O:DeathCheck()
viewers(O) << "[src.owner] has hit [O:name] with \his [src]!"


else if(isobj(O)) del O //you may not want this :D //remove overlay after some time
if(src.splash) Explosion(src.loc,src.splash) //if it has a splash, make an explosion (an explosion proc is not included here)
src.owner.icon_state = "walk"
src.owner.step_size = 8
src.owner.frozen = FALSE
src.owner.lightning = FALSE
del src
Kiblast // :)
icon_state = "kiblast" //read New() above for more info. also check the projectiles.dmi
splash=1
dmg = 10
beam //subtype for projectiles that have trails
var
list/trails = new
list/tails = new //this list will contain all the beam's trails
max_trails = 50
max_tails = 2/*max trails the beam is allowed to have.
if the number of trails exceeds this, oldest trails will be deleted
when new ones are created. If this equals 0, then there's no limit
and trails will only be deleted if the beam is deleted.*/

New()
..() //Do the parent type action (the above New() overridation)
src.icon_state = "[src.icon_state]head" /*afterwards,
append "head" to the icon_state. main beam states have "head"
appended to the end, trails have "trail". See below example*/

Del() //Del() is run when objects are going to get deleted.
for(var/A in src.trails) del A //delete all trails
..() //do the actual default behaviour - delete self
Move()
if(locate(/obj/projectile/beam/tail/) in src.loc)
..() //handle trail creating.
var/turf/old_loc = src.loc //store current turf
. = ..() //call the parent (above overriden proc), store the return value
if(!.) return //if it returned false, (movement failed), return false too (and stop this proc)
//otherwise, if movement succeeded...
var/obj/O = new(old_loc) //create a new /obj
O.name = "trail" //if you will, set null name instead
O.dir = src.dir
power = overlay('maxki.dmi')
O.density = 0
O.icon = icon(src.icon,"[initial(src.icon_state)]trail") //set it's icon. I use initial() because the CURRENT icon_state already has "head" appended to it
src.trails += O //Add to the trails list for later deletion.
if(src.max_trails && src.trails.len > src.max_trails+1)
var/a = src.trails[1] //get first item in the list (oldest trail)
src.trails -= a
del a
Positivia// :)
icon_state = "kame" //read New() above for more info. also check the projectiles.dmi
splash=2 //makes a small explosion
dmg = 50
tail
icon_state = "kameend"
trail
icon_state = "kametrail"
blank
density = 0

mob/verb
Positivia()
if (energy <= 99)
usr << "you need more energy!!!"
else
lightning = FALSE
aura = overlay('overlay1.dmi', "charging")
icon_state = "charge"
sleep(8)
aura = FALSE
frozen = 1
lightning = overlay('maxki.dmi')
icon_state = "Beam"
var/obj/projectile/beam/blank/N=new(locate(usr))
N.dir=usr.dir
var/obj/projectile/beam/tail/T=new(get_step(usr,usr.dir))
T.dir=usr.dir
T.owner=usr
T.icon_state="kameend"
var/obj/projectile/beam/Positivia/P = new(null,usr)
P.trails += T
P.trails += N
walk(P,P.dir,P.delay)
step_size = 1
energy -= 100
sleep(10)
lightning = FALSE
mob/verb
kiblast()
if (energy <= 4)
usr << "you need more energy!!!"
else
lightning = FALSE
flick("kiblast", src)
var/obj/projectile/Kiblast/P = new(null,usr)
walk(P,P.dir,P.delay)
energy -= 5
mob/Logout(mob/M)
del(src)
obj/explode
icon = 'Explosion.dmi'
layer=MOB_LAYER+1
obj/proc/Explosion()

if(!mob) return ..() //if we don't have a mob, this code doesn't need to run
if(mob.frozen) return 0 //if the frozen variable is set, don't allow movement
return ..() //move the player if possible

mob/var/frozen = FALSE
var/destructable
wall2
density = 1
destructable = 1
icon = 'breakrock.dmi'
face
icon = 'drey.dmi'
icon_state = "face"
screen_loc = "1,7"
nvm i fixed it. but thanks. :)
some how, my other code got spliced.
sorry for the split posts, but now i got another end statement need.
obj
var/destructable
wall2
density = 1
destructable = 1
icon = 'breakrock.dmi'
face
icon = 'drey.dmi'
icon_state = "face"
screen_loc = "1,7"

thelegend.dm:546:error: obj: expected end of statement
There should be a line above the line with obj that has an unfinished assignment - that is, you probably have value = . You don't have anything on the right side of the equals sign. Look for anything unfinished.
yep. my code got seriously spliced. i dont know how though.
heres what is above it.
    if(!mob) return ..() //if we don't have a mob, this code doesn't need to run
if(mob.frozen) return 0 //if the frozen variable is set, don't allow movement
return ..() //move the player if possible
obj
var/destructable
wall2
density = 1
destructable = 1
icon = 'breakrock.dmi'
face
icon = 'drey.dmi'
icon_state = "face"
screen_loc = "1,7"
Best response
Look higher. It isn't very hard to find something incomplete. Look for something with an equals sign next to it but nothing after the sign. Look for anything (Except parenthesis, that's a different error) that would tell the compiler that you didn't finish what you were doing.
i found out what was supposed to be above if(!mob) return ..(). thanks for the tips.