## TESTING: Jukebox - Updating playlist from http://ss13.pomf.se/media/index.php?playlist=muzak...
runtime error: Unexpected token: key general
key = "Kurba"
ckey = "kurba"
gender = "male"
joined = "2014-09-24"
online = 1
index:2 .
proc name: die (/json_reader/proc/die)
source file: JSON Reader.dm,220
usr: null
src: /json_reader (/json_reader)
call stack:
/json_reader (/json_reader): die(/json_token/word (/json_token/word))
/json_reader (/json_reader): read value()
Jukebox (/obj/machinery/media/jukebox/dj): retrieve playlist("muzak")
Jukebox (/obj/machinery/media/jukebox/dj): process()
Jukebox (/obj/machinery/media/jukebox/dj): update music()
Radio Transmitter (/obj/machinery/media/transmitter/broadcast/dj): hook media sources()
Radio Transmitter (/obj/machinery/media/transmitter/broadcast/dj): initialize()
/datum/controller/game_control... (/datum/controller/game_controller): setup objects()
/datum/controller/game_control... (/datum/controller/game_controller): setup()
: New()
retrieve_playlist calls export to the media server and returns a json string, in client/New() i've got this.
var/list/http[] = world.Export("http://www.byond.com/members/[src.key]?format=text") // Retrieve information from BYOND
var/Joined = 2550-01-01
if(http && http.len && ("CONTENT" in http))
var/String = file2text(http["CONTENT"]) // Convert the HTML file to text
var/JoinPos = findtext(String, "joined")+10 // Parse for the joined date
Joined = copytext(String, JoinPos, JoinPos+10) // Get the date in the YYYY-MM-DD format
I found something in the logic that suggests a possible issue here, if one is already open with the right address.