samp error
#1

:\Documents and Settings\SisasPoiss\My Documents\Downloads\LSRM.pwn(43856) : warning 235: public function lacks forward declaration (symbol "NameTimer")
C:\Documents and Settings\SisasPoiss\My Documents\Downloads\LSRM.pwn(43876) : error 017: undefined symbol "GetPointDistanceToPointExMorph"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


Код:
stock strvalEx( const string[] ) // fix for strval-bug with > 50 letters.
{
	// written by mabako in less than a minute :X
	if( strlen( string ) >= 50 ) return 0; // It will just return 0 if the string is too long
	return strval(string);
}

public NameTimer()
{
	for(new i = 0;i < MAX_PLAYERS;i++)
 	{
	 	if(IsPlayerConnected(i))
 		{
 			for(new q = 0;q < MAX_PLAYERS;q++)
 			{
				if(IsPlayerConnected(q))
				{
 					new Float:p1x;
					new Float:p1y;
					new Float:p1z;
					new Float:p2x;
					new Float:p2y;
					new Float:p2z;
					if(IsPlayerConnected(i) && IsPlayerConnected(q))
					{
						GetPlayerPos(i,p1x,p1y,p1z);
  					GetPlayerPos(q,p2x,p2y,p2z);
						if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)
						{
							if(PlayerInfo[q][pMaskuse] != 1)
	  					{
								ShowPlayerNameTagForPlayer(i,q,1);
							}
	  				}
						else
						{
							ShowPlayerNameTagForPlayer(i,q,0);
						}
          }
        }
      }
    }
	}
}



public CheckCarHealth()
{
  new string[256];
Reply
#2

For your first warning:
Код:
forward NameTimer();
And for your error, you probably haven't defined the function anywhere in your script.
Reply
#3

Quote:
Originally Posted by DJDhan
For your first warning:
Код:
forward NameTimer();
And for your error, you probably haven't defined the function anywhere in your script.
How can i Define it ? any ideas ?

on that line is
Код:
public NameTimer() // 43912
{ //43913
	for(new i = 0;i < MAX_PLAYERS;i++) //43914
 	{ //43915
	 	if(IsPlayerConnected(i)) //43916
 		{ //43916
 			for(new q = 0;q < MAX_PLAYERS;q++) //43917
 			{ //43918
				if(IsPlayerConnected(q)) ////43919
				{ //43920
 					new Float:p1x; //43921
					new Float:p1y; //43922
					new Float:p1z; //43923
					new Float:p2x; //43924
					new Float:p2y; //43925
					new Float:p2z; //43926
					if(IsPlayerConnected(i) && IsPlayerConnected(q)) //43927
					{ ////43928
						GetPlayerPos(i,p1x,p1y,p1z); //43929
  					GetPlayerPos(q,p2x,p2y,p2z); //43930
						if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance) //43931
						{ //43932
							if(PlayerInfo[q][pMaskuse] != 1) //43933
	  					{ //43934
								ShowPlayerNameTagForPlayer(i,q,1); //43935
							} //43936
	  				} //43937
						else //43938
						{ //43939
							ShowPlayerNameTagForPlayer(i,q,0); //43940
						} //43941
Reply
#4

Just use the function anywhere inside your script.
Reply
#5

Quote:
Originally Posted by CJ101
Just use the function anywhere inside your script.
Err, it is a undefined symbol error, not a "symbol never used" warning



I found this on the forum, it's part of a include file you're missing.

Код:
Float:GetPointDistanceToPointExMorph(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
{
new Float:x, Float:y, Float:z;
x = x1-x2;
y = y1-y2;
z = z1-z2;
return floatsqroot(x*x+y*y+z*z);
}
Reply
#6

new error -.-

Код:
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : warning 215: expression has no effect
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 001: expected token: ";", but found ")"
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : fatal error 107: too many error messages on one line
Reply
#7

Quote:
Originally Posted by SisasPoiss
new error -.-

Код:
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : warning 215: expression has no effect
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 001: expected token: ";", but found ")"
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : fatal error 107: too many error messages on one line
Yes, we are all clairvoyant and know exactly how your script looks like.z
Show the lines sherlock.
Reply
#8

Find if you missed a semi-colon in that line before a ) [closing bracket]
Reply
#9

Quote:
Originally Posted by DJDhan
Find if you missed a semi-colon in that line before a ) [closing bracket]
all errors are on the same line

Код:
					
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)) // on this one
						{
							if(PlayerInfo[q][pMaskuse] != 1);
	  					{
								ShowPlayerNameTagForPlayer(i,q,1);
							}
	  				}
						else
Reply
#10

Quote:
Originally Posted by SisasPoiss
Quote:
Originally Posted by DJDhan
Find if you missed a semi-colon in that line before a ) [closing bracket]
all errors are on the same line

pawn Код:
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)/*)*/ // on this one//<---------here
                        {
                            if(PlayerInfo[q][pMaskuse] != 1);
                        {
                                ShowPlayerNameTagForPlayer(i,q,1);
                            }
                    }
                        else
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)