ID:171949
 
Thanks everyone for helping me figure that one out. My jukebox is working great now.
Click() doesn't work like normal verbs in that you can't use the parameters the same way. The Click(atom) argument is the location of the click. You'll need another input() as sound|null for players to choose a file.
In response to tenkuu
I made some changes but I still cant get it to work, any suggestions?
obj
jukebox
icon='jukebox.dmi'
density = 1

mob/proc/Jukebox(S as sound)
S=input("Pick a song to play.","Song",S)
var/playarea = input("Which area do you want [S] to effect?")in typesof(/area)-/area
for(var/area/A in world)
if(A.type == playarea)
A.sound = S
else
continue

area
bar
icon='box.dmi'
icon_state="bar"
layer=MOB_LAYER+2
town
icon='box.dmi'
icon_state="town"
layer=MOB_LAYER+2
var
sound
Entered(mob/M)
if(ismob(M))
M << sound(src.sound,1)

client
Center()
var/obj/jukebox/S = locate(/obj) in get_step(usr,usr.dir)
if(S in get_step(usr,usr.dir))

usr.Jukebox()
In response to Troglodyte
I hate to do this but *bump*.
In response to Troglodyte
See: http://developer.byond.com/forum/ index.cgi?action=message_read&id=274085

A proc does not work like normal verbs either. You'll need an input to get the sound.
In response to Jon88
So how could I make this work? I just can't figure it out. I try another input() but i dont know what to do in it.

ex:
var/S = input("Which song you wanna play?","Song",<I dont know what to put here>)

In response to Troglodyte
var/S = input("Which song you wanna play?","Song") as sound|null


The |null part is important so that players can cancel while choosing a sound.