SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/07/2012, 03:59 PM   #1
dundolina
Gangsta
 
Join Date: May 2010
Posts: 576
Reputation: 4
Default 1 error problem (+REP)

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


1 Error.
dundolina is offline   Reply With Quote
Old 24/07/2012, 04:02 PM   #2
Kindred
High-roller
 
Join Date: Aug 2011
Posts: 1,252
Reputation: 504
Default Re: 1 error problem (+REP)

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.
Kindred is offline   Reply With Quote
Old 24/07/2012, 04:05 PM   #3
dundolina
Gangsta
 
Join Date: May 2010
Posts: 576
Reputation: 4
Default Re: 1 error problem (+REP)

Code:
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 :

Code:
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;
}
Code:
//----<Forwards>----//
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
dundolina is offline   Reply With Quote
Old 24/07/2012, 04:07 PM   #4
Kindred
High-roller
 
Join Date: Aug 2011
Posts: 1,252
Reputation: 504
Default Re: 1 error problem (+REP)

(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.
Kindred is offline   Reply With Quote
Old 24/07/2012, 04:19 PM   #5
tiernantheman
Huge Clucker
 
Join Date: Dec 2011
Location: United States
Posts: 397
Reputation: 66
Default Re: 1 error problem (+REP)

Lol. Why not just use IsPlayerInRangeOfPoint? Here's the SYNTAX for it. http://wiki.sa-mp.com/wiki/IsPlayerInRangeOfPoint
tiernantheman is offline   Reply With Quote
Old 24/07/2012, 04:19 PM   #6
Goru
Big Clucker
 
Join Date: May 2012
Posts: 84
Reputation: 0
Default Re: 1 error problem (+REP)

Or, instead of PlayerToPoint you can do sPlayerInRangeOfPoint? Just got back to doing Pawn so I might be wrong..
Goru is offline   Reply With Quote
Old 24/07/2012, 04:20 PM   #7
dundolina
Gangsta
 
Join Date: May 2010
Posts: 576
Reputation: 4
Default Re: 1 error problem (+REP)

If you add in filterscript gamemode will give me a problem again or go to normal?
dundolina is offline   Reply With Quote
Old 24/07/2012, 04:23 PM   #8
Kindred
High-roller
 
Join Date: Aug 2011
Posts: 1,252
Reputation: 504
Default Re: 1 error problem (+REP)

Quote:
Originally Posted by dundolina View Post
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.
Kindred is offline   Reply With Quote
Old 24/07/2012, 04:45 PM   #9
Goru
Big Clucker
 
Join Date: May 2012
Posts: 84
Reputation: 0
Default Re: 1 error problem (+REP)

Yeah, I didn't understand what he said.. But +Rep me if I helped and you find my post useful
Goru is offline   Reply With Quote
Old 24/07/2012, 04:47 PM   #10
dundolina
Gangsta
 
Join Date: May 2010
Posts: 576
Reputation: 4
Default Re: 1 error problem (+REP)

Ok,thanks for this.How to fix this?

Code:
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 (c) 1997-2006, ITB CompuPhase


2 Errors.
dundolina is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error SA:MP - problem thebwgg Client Support 2 10/06/2012 01:16 PM
Problem Error KeeDee Scripting Help 3 06/03/2012 12:08 PM
Problem: Error tbedy Help Archive 5 23/03/2011 10:00 PM
SA:MP Error problem Huxley Client Support 6 31/10/2010 02:39 AM
Little problem [error 001] Flashy Help Archive 3 02/06/2010 12:40 PM


All times are GMT. The time now is 06:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.