ID:267605
 
well, I'm trying to get my code to work to have channels be as obj's, but whenever I try the join code, it tells me that it may be a possible infinant loop.
obj/channel/var
owner
canplay
cantalk
list
insta
var/obj/channel/C


mob/verb
new_chan()
set category = null
C = new()
C.name = input("What is your station's name?","Station Name") as text
C.owner = src
var/a = input("Can people play music on this station?","Music") in list("Yes","No")
switch(a)
if("Yes")
C.canplay = 0
if("No")
C.canplay = 1
var/b = input("Can people talk on this station?","Talk") in list("Yes","No")
switch(b)
if("Yes")
C.cantalk = 0
if("No")
C.cantalk = 1
join(obj/channel/C in world)
set category = null
var/obj/channel/C = input("What Channel?") in list(C)
C.insta += src

join(obj/channel/C in world)
set category = null
var/obj/channel/C = input("What Channel?") in list(C)
C.insta += src


You defined a var in two places, for one thing. Also, saying in list(C) should only display one channel.
In response to Kunark
I thuought that the (obj/channel/C in world) would act like a for() type thing, but I guess it's back to the typing board...thing...object...