ID:264307
 
Code:
turf/Recources
Build_Site
icon = 'Turfs.dmi'
icon_state = "build site"
verb/Build()
var/list/classlist = list("Tree","Clay pit","Wheat Field","Mountain","Armory","Flour Mill")
var/cclass = input(src,"buildings") in classlist
switch(cclass)
if("Tree")
src = new /turf/Resources/Tree_Lv_0 ()
if("Clay Pit")
src = new /turf/Resources/Clay_Pit_Lv_0 ()
if("Wheat Field")
src = new /turf/Resources/Wheat_Field_Lv_0 ()
if("Mountain")
src = new /turf/Resources/Mountain_Lv_0 ()
if("Armory")
src = new /turf/Resources/Armory_Lv_0 ()
if("Flour Mill")
src = new /turf/Resources/Flour_Mill_Lv_0 ()


Problem description:
runtime error: bad client
proc name: Build (/turf/Recources/Build_Site/verb/Build)
source file: Build_Site.dm,8
usr: Prf X (/mob)
src: Build Site (6,7,2) (/turf/Recources/Build_Site)
call stack:
Build Site (6,7,2) (/turf/Recources/Build_Site): Build()


   var/cclass = input(src,"buildings") in classlist


You're trying to get an answer from the turf ? That's the error. You're sending the input to the turf and not to the user.
In response to Andre-g1
Thank,
But now it say:
runtime error: bad loc
proc name: Build (/turf/Recources/Build_Site/verb/Build)
source file: Build_Site.dm,14
usr: Prf X (/mob)
src: Build Site (6,7,2) (/turf/Recources/Build_Site)
call stack:
Build Site (6,7,2) (/turf/Recources/Build_Site): Build()
In response to Prf X
You're doing the exact same thing I explained here: [link].
In response to Prf X
Turfs need to be told exactly where to be made. Consider the following line:

new /turf()

You'd probably guess that that creates a new turf, but where is that new turf made? All turfs have to exist somewhere on the map, but where should DM put that one? You may know where you want it, because the player is using the verb or because you're trying to replace another turf, but DM doesn't know all that, and DM can't put that turf anywhere unless you tell it where.

When instantiating a new atom (area, turf, obj, or mob) you can tell it where you want it to go. In the case of turfs, you have to tell it where to go. You do that by passing a turf to the New() proc. In the next example, let's assume that the variable "my_turf" is a turf that we've located somehow. We'll pass that turf as the location of the new turf we're making:

new /turf(my_turf)

So, how do we locate a turf to pass as the new location? We can use the locate() proc like has been suggested. There are other ways to pass a turf, though. For instance, the player might be standing on a turf. In that case, player.loc will be a valid turf, and we can pass that as the new location.