scroll
verb
description()
usr << "A Scroll For Summoning Items (Random)"
Use()
var B = rand(1,3) // rolls a dice 1 through 3
switch(B)
if (1)
var/obj/tv/J = new (locate(usr)); get(J)
if (2)
var/obj/armchair/J = new (locate(usr)); get(J)
if (3)
var/obj/scroll/J = new (locate(usr)); get(J)
Problem description: It wont let me use switch(B) to make a random dice roll to spawn an item inside the inventory, please help and tell me why i get these error messages: 89:error::invalid expression and 88:error:rand:undefined proc
And now when i use the new code i get 4 errors saying my indentation is inconsistent, this is my new code here.
scroll
verb
description()
usr << "A Scroll For Summoning Items"
Use()
var/a=pick(/obj/tv, /obj/armchair, /obj/scroll)
var/j=new a
Get(j)
del(src)
Somebody tell me how to indent this -_-