ID:144587
 
Code:
    scroll
verb
description()
usr << "A Scroll For Summoning Items"
Use()
if(!s)return
if(!j)return
var/s=pick(
/obj/tv/,
prob (100)
/obj/armchair/,
prob(101,102) )
var/j=new s
get(j)
del(src)


Problem description:Erm it gives me a runtime error and only works to delete the scroll and give nothing, I added
if(!s)return
if(!j)return
And now it doesnt do anything which is better, correct? anyways plesae help me...(sorry for multiple topics in like last 2 days, help will be apprechiated though)

It would be very helpful if posted the runtime error you got.

I think it's because of this: "prob(101,102) ", which is null as nothing is after it.

- GhostAnime
That's still wrong.

scroll
verb
description()
//whatever
Use()
var
s=pick(/obj/tv, /obj/armchair)
j=new s
get(j)
return


I really suggest you read the DM guide, if you haven't already. Keep reading it until you understand.
In response to Jp
Jp wrote:
That's still wrong.

> scroll
> verb
> description()
> //whatever
> Use()
> var
> s=pick(/obj/tv, /obj/armchair)
> j=new s
> get(j)
> return
>

I really suggest you read the DM guide, if you haven't already. Keep reading it until you understand.

Ok, 1) that makes the scroll continue to spawn nothing, 2)Its not randomized. Help?