PDA

View Full Version : Dreaded Radio Script.


Angel_Light
05-17-2006, 12:14 AM
Hi all,

I've seen a few servers making scripts like this so I tried. I looked at some of Stefan music and post and now got this so far.

function onActionServerSide() {
if (params[0]=="electronica") {
this.req = requesturl("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=1029&file=filename.pls");
catchevent(this.req,"onReceiveData","onData");

function onData(obj) {
for (line: obj.data) {
if (line.starts("File1=http://64.236.34.4:80/stream/1035")) {
play(line.substring(6));
setTimer(0.1);
break;
}
}
this.req = NULL;
}
}
}

Not much but I still can't get it to play. XD I'm using a triggeraction for it becuase I believe it needs to be serverside since it's dealing with actual internet stuff ._.
So what am I doing wrong? Why wont it play. Here's the triggeraction part.

function electronica.onAction(){
triggeraction(0, 0, "serverside", this.name, electronica);
}

Angel_Light
07-01-2006, 04:57 AM
Can anyone help me?

Admins
07-03-2006, 12:24 AM
Ah sorry for not helping earlier.
It should all be done on clientside. Requesturl is working better on clientside (currently only ips are allowed at hostname on serverside, not full web addresses), also play will only work on clientside.

Angel_Light
07-03-2006, 02:54 AM
ok thank you.

Valtor
02-24-2009, 05:28 PM
Hello
I will in my server a Radio SuperNova Radio for SuperNova Radio Admin and SuperNova Radio make
the must when i say play 1 the music come