ID:827269
 
Keywords: a, help, just, little
(See the best response by DarkCampainger.)
var
list
Liquid_States = list("Water","Lava")
turf
icon = 'Turf.dmi'
name = "Turf"
var
Power = 0
Power_Type = "Physical"
Time = 0
mob/Creator = null
proc
Transform(Turf,mob/Owner)
if(loc:type/area/Safe_Zone)return
switch(Turf)
if("Shock")
for(var/obj/Projectile/Shock/S in range(0,src))
if(S.Owner == Owner)
S.Power = Owner.Overall_Lvl
return
var/obj/Projectile/Shock/S = new /obj/Projectile/Shock
S.loc = src
S.Owner = Owner
S.Power = Owner.Overall_Lvl
if("Lightning Bolt")
for(var/obj/Projectile/Lightning_Spike/S in range(0,src))
if(S.Owner == Owner)
S.Power = Owner.Overall_Lvl
return
var/obj/Projectile/Lightning_Spike/S = new /obj/Projectile/Lightning_Spike
S.loc = src
S.Owner = Owner
S.Power = Owner.Overall_Lvl
if("Lava")
if(Liquid_States.Find(icon_state))return
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Heat"
if("Fire")
if(Liquid_States.Find(icon_state))return
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Heat"
if("Intense Fire")
if(Liquid_States.Find(icon_state))return
icon_state = Turf
density = 1
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Heat"
if("Smoke")
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Suffocation"
if("Intense Smoke")
icon_state = Turf
density = 1
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Suffocation"
if("Light")
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Light"
if("Bright Light")
icon_state = Turf
density = 1
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Light"
if("Ice")
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Cold"
if("Snow Cliff")
icon_state = Turf
density = 1
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Cold"
if("Sand")
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Dehydration"
if("Quick Sand")
if(icon_state != "Quick Sand")
spawn(1)while(Power > 0&&icon_state == "Quick Sand")
for(var/mob/M in range(1,src))
spawn(0)
if(!M.Movable)
goto Skip
if(M == Owner)goto Skip
step_towards(M,src)
Skip
sleep(25)
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Dehydration"
if("Darkness")
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Physical"
if("Darkness Pull")
if(icon_state != "Darkness Pull")
spawn(1)while(Power > 0&&icon_state == "Darkness Pull")
for(var/mob/M in range(3,src))
spawn(0)
if(!M.Movable)
goto Skip
if(M == Owner)goto Skip
step_towards(M,src)
Skip
sleep(25)
icon_state = Turf
density = 0
opacity = 0
Power = Owner.Overall_Lvl
Power_Type = "Physical"
Creator = Owner
while(Power > 0)
Power -= 5
sleep(10)
Power = initial(Power)
Power_Type = initial(Power_Type)
icon = initial(icon)
icon_state = initial(icon_state)
density = initial(density)
opacity = initial(opacity)
Grass
icon_state = "Grass"
Dirt
icon_state = "Dirt"
Sand
icon_state = "Sand"
Mud
icon_state = "Mud"
Cavefloor
icon_state = "Cavefloor"
Snow
icon_state = "Snow"
Power = 30
Power_Type = "Cold"
Ice
icon_state = "Ice"
Power = 30
Power_Type = "Cold"
Snow_Cliff
icon_state = "Snow Cliff"
density = 1
opacity = 1
Power = 30
Power_Type = "Cold"
Cliff
icon_state = "Cliff"
density = 1
opacity = 1
Water
icon_state = "Water"
Wooden_Floor
icon_state = "Wooden Floor"
Wooden_Floor2
icon_state = "Wooden Floor2"
Wooden_Wall
icon_state = "Wooden Wall"
density = 1
Wooden_Roof
icon_state = "Roof"
density = 1
opacity = 1
Wooden_Roof_Leave
icon_state = "Roof"
density = 1
opacity = 1
Enter(atom/movable/A)
A.y -= 3
Entrance
icon_state = "Entrance"
density = 1
opacity = 0
Enter(atom/movable/A)
A.x -= 8
Ladder
icon_state = "Ladder"
density = 1
opacity = 0
layer = 4
Enter(atom/movable/A)
A.x += 8
Rope_Ladder
icon_state = "Rope Ladder"
density = 1
opacity = 0
layer = 4
Enter(atom/movable/A)
A.x += 8
Rope_Ladder_Fake
icon_state = "Rope Ladder"
density = 0
opacity = 0
layer = 6
Wooden_Dark_Roof
icon_state = "Dark Roof"
density = 1
opacity = 1
Wooden_Dark_Roof_Leave
icon_state = "Dark Roof"
density = 1
opacity = 1
Enter(atom/movable/A)
A.y -= 3
Wall
icon_state = "Wall"
density = 1
Dark_Wall
icon_state = "Dark Wall"
density = 1
opacity = 1
Dark_Wall_Leave
icon_state = "Dark Wall"
density = 1
opacity = 1
Enter(atom/movable/A)
A.y -= 3
Door
icon_state = "Wooden Door"
density = 1
Enter(atom/movable/A)
A.y += 3
Sky
icon_state = "Sky"
density = 0
opacity = 0
Metal_Floor
icon_state = "Metal Floor"
density = 0
opacity = 0
Click()
..()
if(usr.In_Liquid&&usr.loc == src)
switch(z)
if(1)
var/turf/T = locate(x,y,2)
if(!T.density)
var/image/I = image('Effects.dmi',usr.loc,"Diving")
flick("Diving",I)
I.pixel_y = 4
I.layer = 5
if(usr.Gigantism)
I.pixel_y += 14
I.layer += 5
world << I
spawn(6)del(I)
usr.z = 2
usr.In_Water()
usr.Display()
if(2)
if(!usr.Conscious)return
var/turf/T = locate(x,y,1)
if(T.icon_state in Liquid_States)
usr.z = 1
var/image/I = image('Effects.dmi',usr.loc,"Diving")
flick("Diving",I)
I.pixel_y = 5
if(usr.Gigantism)
I.pixel_y += 14
I.layer = 3
world << I
spawn(6)del(I)
usr.In_Water(0)
usr.Display(0)
obj
Turf
icon ='Turf.dmi'
var
Double_Size = 0
Observe
Huge_Log
icon_state = "Huge Log"
density = 1
Bush
icon_state = "Bush"
density = 1
Palm
icon_state = "Palm"
Double_Size = 1
density = 1
Reverse_Palm
name = "Palm"
icon_state = "Reverse Palm"
Double_Size = 1
density = 1
Tree
icon_state = "Tree"
Double_Size = 1
density = 1
Dead_Tree
icon_state = "Dead Tree"
Double_Size = 1
density = 1
Namekian_Tree
name = "Tree"
icon_state = "Namekian Tree"
Double_Size = 1
density = 1
Chair
icon_state = "Chair"
Bench
icon_state = "Bench"
Table
icon_state = "Table"
density = 1
Tables
icon_state = "Tables"
density = 1
Window
icon_state = "Window"
density = 1
Fence
icon_state = "Fence"
density = 1
Mast_Bottom
icon_state = "Mast Bottom"
density = 1
Mast_Middle
icon_state = "Mast Middle"
density = 0
layer = 5
Mast_Top
icon_state = "Mast Top"
density = 0
layer = 5
Sign
icon_state = "Sign"
density = 1
var
Message = ""
Click()
alert(usr,Message,name)
New()
..()
spawn(0)
if(Double_Size)
icon = null
var/icon/Turf = icon('Turf.dmi')
Turf.Scale(64,64)
var/image/I1 = image(Turf,"[icon_state] 0,0",)
var/image/I2 = image(Turf,"[icon_state] 0,1")
var/image/I3 = image(Turf,"[icon_state] 1,0")
var/image/I4 = image(Turf,"[icon_state] 1,1")
I1.pixel_x = -16
I1.pixel_y = 0
I2.pixel_x = -16
I2.pixel_y = 32
I3.pixel_x = 16
I3.pixel_y = 0
I4.pixel_x = 16
I4.pixel_y = 32
I1.layer = 3
I2.layer = 6
I3.layer = 3
I4.layer = 6
overlays.Add(I1)
overlays.Add(I2)
overlays.Add(I3)
overlays.Add(I4)


"loading One Piece.dme
Turf System.dm:14:error: area: undefined var
Turf System.dm:14:error: Safe_Zone: undefined var
Turf System.dm:17:error: S: undefined type: S
Turf System.dm:18:error: S.Owner: undefined type: S.Owner
Turf System.dm:19:error: S.Power: undefined type: S.Power
Turf System.dm:21:error: /obj/Projectile/Shock: undefined type path
Turf System.dm:22:error: S.loc: undefined type: S.loc
Turf System.dm:23:error: S.Owner: undefined type: S.Owner
Turf System.dm:24:error: S.Power: undefined type: S.Power
Turf System.dm:26:error: S: undefined type: S
Turf System.dm:27:error: S.Owner: undefined type: S.Owner
Turf System.dm:28:error: S.Power: undefined type: S.Power
Turf System.dm:30:error: /obj/Projectile/Lightning_Spike: undefined type path
Turf System.dm:31:error: S.loc: undefined type: S.loc
Turf System.dm:32:error: S.Owner: undefined type: S.Owner
Turf System.dm:33:error: S.Power: undefined type: S.Power
Turf System.dm:19:error: Owner.Overall_Lvl: undefined var
Turf System.dm:24:error: Owner.Overall_Lvl: undefined var
Turf System.dm:28:error: Owner.Overall_Lvl: undefined var
Turf System.dm:33:error: Owner.Overall_Lvl: undefined var
Turf System.dm:39:error: Owner.Overall_Lvl: undefined var
Turf System.dm:46:error: Owner.Overall_Lvl: undefined var
Turf System.dm:53:error: Owner.Overall_Lvl: undefined var
Turf System.dm:59:error: Owner.Overall_Lvl: undefined var
Turf System.dm:65:error: Owner.Overall_Lvl: undefined var
Turf System.dm:71:error: Owner.Overall_Lvl: undefined var
Turf System.dm:77:error: Owner.Overall_Lvl: undefined var
Turf System.dm:83:error: Owner.Overall_Lvl: undefined var
Turf System.dm:89:error: Owner.Overall_Lvl: undefined var
Turf System.dm:95:error: Owner.Overall_Lvl: undefined var
Turf System.dm:102:error: M.Movable: undefined var
Turf System.dm:111:error: Owner.Overall_Lvl: undefined var
Turf System.dm:117:error: Owner.Overall_Lvl: undefined var
Turf System.dm:124:error: M.Movable: undefined var
Turf System.dm:133:error: Owner.Overall_Lvl: undefined var
Turf System.dm:17:warning: S: variable defined but not used
Turf System.dm:21:warning: S: variable defined but not used
Turf System.dm:26:warning: S: variable defined but not used
Turf System.dm:30:warning: S: variable defined but not used
Turf System.dm:255:error: usr.In_Liquid: undefined var
Turf System.dm:264:error: usr.Gigantism: undefined var
Turf System.dm:270:error: usr.In_Water: undefined proc
Turf System.dm:271:error: usr.Display: undefined proc
Turf System.dm:273:error: usr.Conscious: undefined var
Turf System.dm:280:error: usr.Gigantism: undefined var
Turf System.dm:285:error: usr.In_Water: undefined proc
Turf System.dm:286:error: usr.Display: undefined proc

One Piece.dmb - 43 errors, 4 warnings (double-click on an error to jump to it)"


Ive come across some errors with some code in a classic game

This is actually my first time ever using these forums so if ive done anything wrong please let me know im just looking for help with the code above thanks in advance

Stop copy/pasting.
Best response
Double click an error, and Dream Maker will show you the line that's causing it (or at least which line it *thinks* is causing it, sometimes you have to look nearby or at the end of a previous file)

Most of them look like you're missing a lot of definitions (code that defines variables and processes). However, the first two are because you forgot the equals operator (==).
@Raimo im confused at want your exactly asking me to stop copy/pasting im not 100% on the forum rules since this is my first time using this forum so i apologize i would have to assume this happens a lot and you get tired of saying the same thing over and over.

@DarkCampainger thank you ill keep looking and messing around with codes
No, you can place your code here perfectly fine. What I wanted to say is, how would you ever get so many errors including undefined var and undefined proc. This mostly shows that people are ripping.
Oh noo the game source was given to me the owner has long since given up on it. its just by chance a friend of mine had the source and let me have a copy of it. what i didn't know is he made change attempts or i would assume but all the errors occurred in the turf system i came here to see if any one didn't mind helping me figure this stuff out.
Undefined var: the var isn't declared.
Undefined proc: the proc isn't declared.
Undefined type: the type isn't declared.
if its not to much trouble could you show me an example of a fix?. im sure you've already figured out im not much of a coder if i cant figure out the basics the whole thing is just hard for me to understand
To define a procedure;

turf
proc
ProcedureName()
Contents of the Procedure
Go here.

To define a variable (var) belonging to the turf type.
turf
var
VariableName
In response to Deathguard (#8)
You forgot the var and proc keywords! ;)

Anyways, Takiharu, you're going to need to learn the basics to get anywhere with DM. Take a peek at this: Welcome, Novice Programmer!
Thank you guys for all the help looks like its time to throw my spare time into coding to try and avoid problems like this :D
In response to DarkCampainger (#9)
Quite right I did. Teach me to do quickfire posts.
Fixed!