HTTP on player connect
#1

This only occurs on linux. Code:
pawn Код:
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;
}
Result - crash.
This is nohup.out:
Quote:

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.

Same problem on 0.3d and 0.3d R2
Reply


Messages In This Thread
HTTP on player connect/PlayAudioStreamForPlayer - by wups - 11.12.2011, 11:29
Re: HTTP on player connect - by T0pAz - 11.12.2011, 12:00
Re: HTTP on player connect - by wups - 11.12.2011, 12:12
Re: HTTP on player connect - by T0pAz - 11.12.2011, 12:21
Re: HTTP on player connect - by TopSecret - 13.12.2011, 11:49
Re: HTTP on player connect - by wups - 13.12.2011, 18:00
Re: HTTP on player connect - by wups - 28.12.2011, 13:17
Re: HTTP on player connect - by Omer. - 19.08.2012, 10:07

Forum Jump:


Users browsing this thread: 3 Guest(s)