tag mismatch?
#1

Hi all, im trying to set up a function which i can use to handle a string & X, Y, Z, Distance values for (PlayAudioStreamForPlayer) which is called from a cmd...

Anywayz here is the code i have no idea whats up with it, all i get is four tag mismatches, on this line below
StreamAudioAtPositionForAll(string, pX, pY, pZ, 10.0);//which is in the cmd

pawn Код:
//------------[Command>StreamAudio<]------------
    if(strcmp(cmd, "/startposstream", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerStats[playerid][Adminz] < 6)
            {
                SendClientMessage(playerid, COLOR_GREY, "You must be admin to use this command");
                return 1;
            }
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[128];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /startposstream [url]");
                return 1;
            }
            format(string, sizeof(string), "%s", result);
            new Float:pX, Float:pY, Float:pZ;
            GetPlayerPos(playerid, pX, pY, pZ);
            StreamAudioAtPositionForAll(string, pX, pY, pZ, 10.0);
        }
        return 1;
}
//------------[Function>StreamAudio<]------------
forward StreamAudioAtPositionForAll(string[], X, Y, Z, Distance);
public StreamAudioAtPositionForAll(string[], X, Y, Z, Distance)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            PlayAudioStreamForPlayer(i, string, X, Y, Z, Distance, 1);
        }
    }
}
i have been muckin around with it for hours an im just hoping someone can point it out for me or say if this kinda thing is even possible, Thanks
Reply
#2

pawn Код:
forward StreamAudioAtPositionForAll(string[], Float:X, Float:Y, Float:Z, Float:Distance);
public StreamAudioAtPositionForAll(string[], Float:X, Float:Y, Float:Z, Float:Distance)
Not sure do you have to put in on both but I think you have to.
Reply
#3

ahh yeah i should of noticed that, /me facepalm...

lolz thanks very much
Reply
#4

No problem xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)