SA-MP Forums Archive
1 error problem (+REP) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 1 error problem (+REP) (/showthread.php?tid=362466)



1 error problem (+REP) - dundolina - 24.07.2012

Код:
D:\games\Скинове О.О\Без гангове\Filteri\Fightskill\FightingStyle.pwn(41) : error 017: undefined symbol "PlayerToPoint"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: 1 error problem (+REP) - Kindred - 24.07.2012

I lol'ed.

No default function is named "PlayerToPoint", therefore you must create it.

Show where you use PlayerToPoint so we know how we must setup the function for you, slave finder.


Re: 1 error problem (+REP) - dundolina - 24.07.2012

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp("/fshop", cmdtext, true, 10) == 0)

				if (PlayerToPoint(3, playerid,1579.5493, -1635.6027, 13.5608))
    {
				
        	ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Fighting Style List", "|-> Normal Fighting Styles\n|-> Boxing\n|-> Kungfu\n|-> KneeHead\n|-> GrabKick\n|-> Elbow", "Buy", "Close");
        }
        return 1;
}
I add this on filterscript :

Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z);
	if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
	{ return true; }
	return false;
}
Код:
//----<Forwards>----//
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);



Re: 1 error problem (+REP) - Kindred - 24.07.2012

(Correct me if I'm wrong, please)

You CANNOT use a function that is in a filterscript on your gamemode. You must RECREATE the function, or simply create an include for the function which can easily be loaded by both your gamemode and your filterscript.


Re: 1 error problem (+REP) - tiernantheman - 24.07.2012

Lol. Why not just use IsPlayerInRangeOfPoint? Here's the SYNTAX for it. https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: 1 error problem (+REP) - dundolina - 24.07.2012

If you add in filterscript gamemode will give me a problem again or go to normal?


Re: 1 error problem (+REP) - Kindred - 24.07.2012

Quote:
Originally Posted by dundolina
Посмотреть сообщение
If you add in filterscript gamemode will give me a problem again or go to normal?
Just use IsPlayerInRangeOfPoint like they suggested.

And use valid english. Are you saying "If I add the filterscript into the game gamemode, will it give me a problem again or will it be fixed?".

If that's your question, yes, it will be fixed, as-long as you properly put the filterscript into the gamemode.


Re: 1 error problem (+REP) - dundolina - 24.07.2012

Ok,thanks for this.How to fix this?

Код:
D:\games\Скинове О.О\Без гангове\filterscripts\aHouse.pwn(285) : error 017: undefined symbol "palyerid"
D:\games\Скинове О.О\Без гангове\filterscripts\aHouse.pwn(290) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: 1 error problem (+REP) - Kindred - 24.07.2012

Quote:
Originally Posted by dundolina
Посмотреть сообщение
Ok,thanks for this.How to fix this?

Код:
D:\games\Скинове О.О\Без гангове\filterscripts\aHouse.pwn(285) : error 017: undefined symbol "palyerid"
D:\games\Скинове О.О\Без гангове\filterscripts\aHouse.pwn(290) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
I lol'ed, first off, try to change "palyerid" to "playerid" without quotes, and show where playerid is being used and what function.


Re: 1 error problem (+REP) - tiernantheman - 24.07.2012

Where is that current placed in you're script?