PlayerToPoint[SOLVED]
#1

This error
Код:
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(851) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(870) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(889) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(925) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(944) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(963) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(999) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1018) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1037) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1073) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1092) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1111) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1149) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1167) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1186) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1206) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1227) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1265) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1284) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1303) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1339) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1358) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1377) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1413) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1432) : error 017: undefined symbol "PlayerToPoint"
D:\DOCUME~1\ADMINI~1\Desktop\MYWORK~1\SAMP03~1\GAMEMO~1\begwar.pwn(1451) : error 017: undefined symbol "PlayerToPoint"
but i don`t know why,i have this at the bottom of script

Код:
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 1;
	}
	return 0;
}
Reply
#2

it lacks a closing brace
Reply
#3

Quote:
Originally Posted by ►cristab◄
it lacks a closing brace
True.
The function is fine, the problem is that you got a missing bracket somewhere in your script, where? unknown.
Reply
#4

this appears only when i add a new command on OnPlayerCommandText
Reply
#5

Quote:
Originally Posted by Hor1z0n
this appears only when i add a new command on OnPlayerCommandText
Look at the command added before the new one, count the opening and closing brackets.
Reply
#6

Код:
  if (strcmp("/udeme", cmdtext, true, 10) == 0)
  {
  	if(gTeam[playerid] == TEAM_EME)
  	{
			if(PlayerToPoint(4.0, playerid, 315.9652,-1138.9167,81.5934))
			{
				ResetPlayerWeapons(playerid);
				GivePlayerWeapon(playerid, 4, 1);
				GivePlayerWeapon(playerid, 34, 250);
				SetPlayerSkin(playerid, 236);
				SendClientMessage(playerid, COLOR_BROWN, "You are now a Undercover Kid");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "You are not at eMe Deposit or you are not a eMe Member");
			}
		}
   if(!strcmp(cmdtext,"/g", true,2)) {
    if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "/g(roove)");
    if(gTeam[playerid] != TEAM_GROOVE) return SendClientMessage(playerid, COLOR_GREY, "You are not a groove member !");
    new playername[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "* *Groove [%s]: %s,", playername, cmdtext[2]);
    for(new i = 0; i < MAX_PLAYERS; i++) {
	return 1;
}
this is the last 2 commands
Reply
#7

pawn Код:
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);
Reply
#8

pawn Код:
if (strcmp("/udeme", cmdtext, true, 10) == 0)
  {
    if(gTeam[playerid] == TEAM_EME)
    {
            if(PlayerToPoint(4.0, playerid, 315.9652,-1138.9167,81.5934))
            {
                ResetPlayerWeapons(playerid);
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 34, 250);
                SetPlayerSkin(playerid, 236);
                SendClientMessage(playerid, COLOR_BROWN, "You are now a Undercover Kid");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not at eMe Deposit or you are not a eMe Member");
            }
        }
        }
Now, try that, looks like you forgot a closing bracket.
Reply
#9

didn't work (
Reply
#10

SOLVED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)