Error 017
#1

http://pastebin.com/Xa3GTfRX

Errors: http://pastebin.com/s3vGYsgj
Reply
#2

You must first define that function you are trying to use.

IsPlayerInSphere....
Reply
#3

Quote:
Originally Posted by CharlieSanchez
Посмотреть сообщение
You must first define that function you are trying to use.

IsPlayerInSphere....
But how to fix it? you can make the line fixed and send it here
Reply
#4

IsPlayerInSphere is defined in the uf.inc (Useful Functions)

pawn Код:
stock IsPlayerInSphere(playerid,Float:x1,Float:y1,Float:z1,Float:radius)
{
    new Float:xs,Float:ys,Float:zs;
    GetPlayerPos(playerid,xs,ys,zs);
    return (GetDistanceBetweenPoints(xs,ys,zs,x1,y1,z1)<=radius);
}

stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) //By Gabriel "Larcius" Cordes
{
    return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}
But why don't you just use IsPlayerInRangeOfPoint function which is native in SA-MP. It does pretty much the same thing.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
IsPlayerInSphere is defined in the uf.inc (Useful Functions)

pawn Код:
stock IsPlayerInSphere(playerid,Float:x1,Float:y1,Float:z1,Float:radius)
{
    new Float:xs,Float:ys,Float:zs;
    GetPlayerPos(playerid,xs,ys,zs);
    return (GetDistanceBetweenPoints(xs,ys,zs,x1,y1,z1)<=radius);
}

stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) //By Gabriel "Larcius" Cordes
{
    return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}
But why don't you just use IsPlayerInRangeOfPoint function which is native in SA-MP. It does pretty much the same thing.
I need just fix this line , just fix it and send me okay please?

http://pastebin.com/uYfxBeUa
Reply
#6

No, I won't. It's not that hard to just add those 2 functions I posted above at the bottom of your script.
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
No, I won't. It's not that hard to just add those 2 functions I posted above at the bottom of your script.
please man
Reply
#8

Bud all you got to do is copy this code that he gave to you and compile in your script.

But anyways here is a paste bin with the code just copy it to your script...

http://pastebin.com/sKaYLZZn
Reply
#9

Quote:
Originally Posted by CharlieSanchez
Посмотреть сообщение
Bud all you got to do is copy this code that he gave to you and compile in your script.

But anyways here is a paste bin with the code just copy it to your script...

http://pastebin.com/sKaYLZZn
I did what you send me and this is make to the script 26 errors!
Reply
#10

All you had to do was to paste those 2 functions to the script you use, it's not something others can do for you from a forum.

By the way, this line is wrong:
pawn Код:
if(dini_Exists(path) && if(IsPlayerInSphere(playerid,atmInfo[a][aX],atmInfo[a][aY],atmInfo[a][aZ],5);
                return a;
It should be as you had it in your first post:
pawn Код:
if(dini_Exists(path) && IsPlayerInSphere(playerid,atmInfo[a][aX],atmInfo[a][aY],atmInfo[a][aZ],5)) return a;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)