public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new str[128];
format(str,sizeof(str),"www.*******-mp3.org/api/itemInfo/?video_id=%s",g_StartRadio);
HTTP(playerid,HTTP_GET,videostr,"","U2BInfo");
}
forward U2BInfo(playerid, response_code, data[]);
public U2BInfo(playerid, response_code, data[])
{
if(response_code == 200)
{
new result[33], u2bstr[33]; new streamedurl[128];
new crypted = strfind(data, "\"h\"", true, -1);
strmid(result,data,crypted+7,crypted+39,strlen(data));
format(u2bstr,sizeof(u2bstr), "%s", result);
format(streamedurl, sizeof(streamedurl), "http://www.*******-mp3.org/get?video_id=%s&h=%s",g_StartRadio, u2bstr);
PlayAudioStreamForPlayer(playerid, streamedurl);
return 1;
}
/*else
{
SendInfoMessage(playerid,"Fail.");
}*/
return 1;
}
samp03svr: amx/amxstring.c:296: compare: Assertion `c1!=0 && c2!=0' failed. ./autosamp.sh: line 13: 32402 Aborted ${samp} >> $log samp03svr: amx/amxstring.c:296: compare: Assertion `c1!=0 && c2!=0' failed. ./autosamp.sh: line 13: 32461 Aborted ${samp} >> $log samp03svr: amx/amxstring.c:296: compare: Assertion `c1!=0 && c2!=0' failed. ./autosamp.sh: line 13: 32533 Aborted ${samp} >> $log samp03svr: amx/amxstring.c:296: compare: Assertion `c1!=0 && c2!=0' failed. ./autosamp.sh: line 13: 32586 Aborted ${samp} >> $log samp03svr: amx/amxstring.c:296: compare: Assertion `c1!=0 && c2!=0' failed. |
Are you sure that 'data' is not empty? And why are you using -1 as search start in strfind? It should be >= 0.
|