NPC Code:
function onTimeout() {
xr = player.chat.tokenize();
switch(xr[0]) {
case ":ar":
player.chat = "doing..";
this.req = requestURL(xr[1]);
catchEvent(this.req,"onRecieveData","onData");
break;
}
setTimer(.05);
}
function onData(obj) {
player.chat = obj;
}
Obj returns nothing. Absolutely nothing. The chat stays doing.. for the default chat timeout and just disappears. Now the interesting part:
If I were to do player.chat = this.req right below it, and the url was, say
http://www.di.fm/aacplus/lounge.pls, i'd get:
HTTP_www.di.fm_80_/aacplus/lounge.pls
Which of course, yields nothing any closer to parsing it into a stream.
And also, if I extract the ip/port of the stream from the pls file manually, and try to play it within graal, it doesnt work. Why?