obj
Paper_Machine
icon = 'PaperMac.dmi'
desc = "Oohh... buttons, I wonder what they do?"
density = 1
verb
Start(N as num)
set src in view(1)
desc = "Type how many papers you want to make."
usr << "\blue*BEEP*"
view() << " \i\red The machine hums and spits out paper!"
Paper(N)
Examine()
set src in view()
desc = "Choose what to examine!"
usr << "It is shiny and pretty"
proc/Paper(N)
var/Papercnt = 10 //How many papers the machine can hold.
loop:
if(N == 0)
return
if(Papercnt == 0)
view() << "\red The machine didn't spit out any paper!"
return
var/obj/O = /obj/Paper
O.loc = src.loc
N = N-1
goto loop
Problem description:
I can't figure out how to create a new paper object at the location of the printer. (What the Paper Machine). The code compiles at compile-time but at run-time it fails, saying it cannot modify the location of O.loc (AKA Paper). This is probably a simple fix, please help!