PDA

View Full Version : /URLMusic


Ejecter
16/04/2014, 06:43 PM
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

CutX
16/04/2014, 06:48 PM
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:
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;
}

PrivatioBoni
16/04/2014, 08:08 PM
You should indent properly and these mishaps would probably not occur!