ID:1539997
 
(See the best response by Koshigia.)
Code:
world/New()
..()
for(var/obj/Spawners/s in world) all_spawners+=s



var/list/all_spawners=list(/obj/item/bookoffire,/obj/item/bookoflightning,/obj/item/bookofice,/obj/item/bookofphoenix,/obj/item/bookofgravity,/obj/item/bookofshadow,/obj/item/bookofsmoke,/obj/item/bookofwind)
obj/Spawners



mob/proc/Spawn_Player()
var/obj/Spawners/s = pick(all_spawners)
src.loc = s.loc


Problem description:Nothing will spawn there the spawner is located. =(

It's probably because your all_spawners is full of paths and not object references. You want to remove those from the list or initialize them accordingly.
In response to FKI
FKI wrote:
It's probably because your all_spawners is full of paths and not object references. You want to remove those from the list or initialize them accordingly.

What would be initializing them accordingly? I understand that paths are not correct, but how would I reference them?
Exactly how you want your spawning to work is unclear to me. Are you trying to spawn the player randomly at the location of one of those books? If so...

var/list/all_spawners = new


obj/book/spawn
New()
..()
all_spawners += src

book_of_fire
book_of_lightning


If you do something like this, all you have to do is place that book in the world somewhere, whether using the map maker or by some other means at runtime, and it will become a valid spawn location.
I'm trying to spawn the books randomly onto the marked spawn points.
Best response
ok, let's try again then.

var/list/all_spawners=list(/obj/item/bookoffire,/obj/item/bookoflightning,/obj/item/bookofice,/obj/item/bookofphoenix,/obj/item/bookofgravity,/obj/item/bookofshadow,/obj/item/bookofsmoke,/obj/item/bookofwind)


obj/Spawner
New()
..()
spawn_book()

proc
spawn_book()
var/new_book_type = pick(all_spawners)
new new_book_type(src.loc)


This should create a random book on each spawner. Any time you want the book to do this, you can just call spawner.spawn_book()


*edit* fixed error in code. If you see anymore let me know

*edit* changed var/type/new_book_type to var/new_book_type (sorry, Im a bit tired)
Says new_book_type is an undefined var. Didn't you define it on the line above it?
var/type/new_book_type = pick(all_spawners)
new new_book_type(src.loc)


Look at it again.
In response to Micdogmic
fixed above, read *edit* note in post