SA-MP Forums Archive
/URLMusic - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /URLMusic (/showthread.php?tid=507225)



/URLMusic - Ejecter - 16.04.2014

if(dialogid == 439){
if(!response)return 1;
if(strlen(inputtext))
{
SendClientMessageToAll(-1, MUSstr);
for ( new i, j = GetMaxPlayers( ) ; i < j ; ++ i)
{
format(MUSstr,sizeof(MUSstr),"%s",inputtext);
PlayAudioStreamForPlayer(i,MUSstr);
}
}
}
return 1;
}

The pawn is crashing and i don't know why
Help


Re: /URLMusic - CutX - 16.04.2014

Quote:
Originally Posted by Ejecter
Посмотреть сообщение
if(dialogid == 439){
if(!response)return 1;
if(strlen(inputtext))
{
SendClientMessageToAll(-1, MUSstr);
for ( new i, j = GetMaxPlayers( ) ; i < j ; ++ i)
{
format(MUSstr,sizeof(MUSstr),"%s",inputtext);
PlayAudioStreamForPlayer(i,MUSstr);
}
}
}
return 1;
}

The pawn is crashing and i don't know why
Help
one closing bracket too much:
pawn Код:
if(dialogid == 439)
{
    if(!response) return 1;
    if(strlen(inputtext))
    {
        SendClientMessageToAll(-1, MUSstr);
        for ( new i, j = GetMaxPlayers( ) ; i < j ; ++ i)
        {
            format(MUSstr,sizeof(MUSstr),"%s",inputtext);
            PlayAudioStreamForPlayer(i,MUSstr);
        }
    }
    }//this one, just remove that
    return 1;
}



Re: /URLMusic - PrivatioBoni - 16.04.2014

You should indent properly and these mishaps would probably not occur!