area
NoBuild//flood the places you dont want people to build, with this areaa.
mob
proc
Nobuild()
for(var/area/O in oview(0,src))
if(istype(O,/area/NoBuild))
src<<"It's no good we can't build here.."
return 0
else
return 1
///////////////////////////BUILDING
obj
Wall
name = "Red_Wall"
icon = 'Obj.dmi'
icon_state = "Wall"
density = 0
opacity = 0
var/owner = ""
Click()
if(src.Nobuild())
var/W = new/obj/Wall(usr.loc) //makes a wall in the usr's loc.
W:owner = "[usr.key]" //makes the walls owner the usr's key.
////////////////////////////////
mob
Login()
usr.contents += new/obj/Credwall
usr.loc = locate(1,1,1)
///////////////////////////////
mob
Stat()
statpanel("Build",src.contents)
I get this Obj.dm:23:error:src.Nobuild:undefined proc Help! The proc's there but byond doesn't reconize it.
[Note: usr is o.k. here, but it's not the best soltuion, because there are a few usr safe procs, and Click() is one of them]
If you ever run into a jam like this, simply do something like this.
This usually helps me fix any of those confusing things that happen.
This is your fixed code, because src refers to the OBJECT, you should use usr.