error 010: invalid function or declaration
#1

Here is my error, What is wrong?

Код:
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13804) : error 010: invalid function or declaration
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13806) : error 010: invalid function or declaration
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13812) : error 010: invalid function or declaration
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13814) : error 010: invalid function or declaration
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13821) : error 010: invalid function or declaration
Here is the code:

if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431); // or you can use If(IsPlayerInRangeOfPoint(playerid,range,X,Y,Z)
{
if(!GetPVarInt(playerid,"knull")) // we are looking if there as variable with the name 'spawn' present , which we havent created yet
{
SetPVarInt(playerid,"knull",1); // since there wasnt , we now create it so that the loop doesnt enter this again n again and create 'lag'
PlayAudioStreamForPlayer(playerid,"http://www.youtube.com/watch?v=oMOxoQm4iJ0",-2105.9446,2698.6633,161.1431,20,1);
}
}
else // player is not in point range
{
if(GetPVarInt(playerid,"knull")) // since we create it before and played the stream , it will be there
{
DeletePVar(playerid,"knull");// delete the variable so that next time player goes in range the radio can be started again
StopAudioStreamForPlayer(playerid); and stop stream
}
}

return 1;
}
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431) // or you can use If(IsPlayerInRangeOfPoint(playerid,range,X,Y,Z)
{
if(!GetPVarInt(playerid,"knull")) // we are looking if there as variable with the name 'spawn' present , which we havent created yet
{
SetPVarInt(playerid,"knull",1); // since there wasnt , we now create it so that the loop doesnt enter this again n again and create 'lag'
PlayAudioStreamForPlayer(playerid,"http://www.youtube.com/watch?v=oMOxoQm4iJ0",-2105.9446,2698.6633,161.1431,20,1);
}
else // player is not in point range
{
if(GetPVarInt(playerid,"knull")) // since we create it before and played the stream , it will be there
{
DeletePVar(playerid,"knull");// delete the variable so that next time player goes in range the radio can be started again
StopAudioStreamForPlayer(playerid); //and stop stream
}

return 1;

}
Reply
#3

HMM still getting thoose errors :S
Reply
#4

Show line 13804
Reply
#5

This is the line
Код:
if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431)
Reply
#6

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431) print("You must have somthing here before ; ");
or
if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431)
{
}
Reply
#7

Код:
if(IsPlayerInRangeOfPoint(playerid,20,-2105.9446,2698.6633,161.1431) print("You must have somthing here before ; ");
The "print" line What do i have to type there? :P
Reply
#8

okay im getting 1 error now
Код:
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(13698) : error 001: expected token: ")", but found "-identifier-"
Reply
#9

Fixed theproblem but it repeats the "Audio" url for like 38939890238890890 times
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)