error 010: invalid function or declaration
#1

Код:
(113221) : error 010: invalid function or declaration
(113223) : error 010: invalid function or declaration
(113226) : error 010: invalid function or declaration
(113228) : error 010: invalid function or declaration
(113230) : error 010: invalid function or declaration
(113232) : error 010: invalid function or declaration
(113234) : error 010: invalid function or declaration
(113241) : error 010: invalid function or declaration
(113243) : error 010: invalid function or declaration
(113250) : error 010: invalid function or declaration
(113252) : error 010: invalid function or declaration
(113262) : error 010: invalid function or declaration
(113268) : error 010: invalid function or declaration
Код:
timer CheckStereos[2000](playerid)
{
    if(!IsPlayerNPC(playerid))
	{
	    new hashit;
        foreach (Player, j)
        {
            if(IsPlayerConnected(j))
			{
			    if(PlayerInfo[playerid][pTogRadio] == 1)
			    {
                    if(IsPlayerInRangeOfPoint(playerid, 30.0, pPortableStereo[j][pSPosX],pPortableStereo[j][pSPosY],pPortableStereo[j][pSPosZ]) && pPortableStereo[j][pSPlaced] == 1)
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, StereoChannels[pPortableStereo[j][pSChannel]][SCLink],pPortableStereo[j][pSPosX],pPortableStereo[j][pSPosY],pPortableStereo[j][pSPosZ], 25.0, 1);
						}
						hashit =1;
					}
					else if(IsPlayerInRangeOfPoint(playerid, 30.0, pPortableStereo[playerid][pSPosX],pPortableStereo[playerid][pSPosY],pPortableStereo[playerid][pSPosZ]) && pPortableStereo[playerid][pSPlaced] == 1)
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, StereoChannels[pPortableStereo[playerid][pSChannel]][SCLink],pPortableStereo[playerid][pSPosX],pPortableStereo[playerid][pSPosY],pPortableStereo[playerid][pSPosZ], 25.0, 1);
						}
						hashit =1;
					}
					else if(IsPlayerInRangeOfPoint(playerid, 30.0, 1452.4380, -1576.7020, 13.5469))
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, "http://64.71.144.72:8000/listen.pls", 25.0, 1);
						}
						hashit =1;
					}
				}
			}
		}
		if((PlayerInfo[playerid][pPSPlaying] == 1 && hashit == 0) || (PlayerInfo[playerid][pPSPlaying] == 1 && PlayerInfo[playerid][pTogRadio] == 0))
		{
			PlayerInfo[playerid][pPSPlaying] =0;
			StopAudioStreamForPlayer(playerid);
		}
	}
	return 1;
}
HOW TO FİX ?
Reply
#2

First of all you don't need
if(!IsPlayerNPC(playerid)) and if(IsPlayerConnected(j)) in foreach

Second show lines
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
First of all you don't need
if(!IsPlayerNPC(playerid)) and if(IsPlayerConnected(j)) in foreach

Second show lines
Код:
timer CheckStereos[2000](playerid)
{
  	    new hashit;
        foreach (Player, j)
        {
                if(PlayerInfo[playerid][pTogRadio] == 1)
			    {
                    if(IsPlayerInRangeOfPoint(playerid, 30.0, pPortableStereo[j][pSPosX],pPortableStereo[j][pSPosY],pPortableStereo[j][pSPosZ]) && pPortableStereo[j][pSPlaced] == 1)
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, StereoChannels[pPortableStereo[j][pSChannel]][SCLink],pPortableStereo[j][pSPosX],pPortableStereo[j][pSPosY],pPortableStereo[j][pSPosZ], 25.0, 1);
						}
						hashit =1;
					}
					else if(IsPlayerInRangeOfPoint(playerid, 30.0, pPortableStereo[playerid][pSPosX],pPortableStereo[playerid][pSPosY],pPortableStereo[playerid][pSPosZ]) && pPortableStereo[playerid][pSPlaced] == 1)
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, StereoChannels[pPortableStereo[playerid][pSChannel]][SCLink],pPortableStereo[playerid][pSPosX],pPortableStereo[playerid][pSPosY],pPortableStereo[playerid][pSPosZ], 25.0, 1);
						}
						hashit =1;
					}
					else if(IsPlayerInRangeOfPoint(playerid, 30.0, 1452.4380, -1576.7020, 13.5469))
                    {
                        if(PlayerInfo[playerid][pPSPlaying] == 0)
                        {
                            PlayerInfo[playerid][pPSPlaying] =1;
							PlayAudioStreamForPlayer(playerid, "http://64.71.144.72:8000/listen.pls", 25.0, 1);
						}
						hashit =1;
					}
				}
			}
		}
		if((PlayerInfo[playerid][pPSPlaying] == 1 && hashit == 0) || (PlayerInfo[playerid][pPSPlaying] == 1 && PlayerInfo[playerid][pTogRadio] == 0))
		{
			PlayerInfo[playerid][pPSPlaying] =0;
			StopAudioStreamForPlayer(playerid);
		}
	}
	return 1;
}
And;

Код:
(113221) : error 010: invalid function or declaration
(113224) : error 010: invalid function or declaration
(113226) : error 010: invalid function or declaration
(113228) : error 010: invalid function or declaration
(113230) : error 010: invalid function or declaration
(113237) : error 010: invalid function or declaration
(113239) : error 010: invalid function or declaration
(113246) : error 010: invalid function or declaration
(113248) : error 010: invalid function or declaration
(113258) : error 010: invalid function or declaration
(113264) : error 010: invalid function or declaration
Reply
#4

Help please :/
Reply
#5

Help me please :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)