[HELP] House system
#1

Quote:

enum namoinfo
{
FailoPav,
Float:X,
Float:Y,
Float:Z,
Slaptazodis,
Kaina,
Float:InterjeroX,
Float:InterjeroY,
Float:InterjeroZ,
Interior,
Virtualworld,
ID,
Nupirktas
};
new namoInfo[MAX_NAMU][namoinfo];

WHATS WRONG?

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_SECONDARY_ATTACK )
   {
   for(new i; i<MAX_NAMU; i++)
   {
       if( IsPlayerInRangeOfPoint( playerid, 3.0, namoInfo[i][X], namoInfo[i][Y], namoInfo[i][Z] ) )
      {
           SetPlayerPos( playerid, namoInfo[i][InterjeroX], namoInfo[i][InterjeroY], namoInfo[i][InterjeroZ]);
           SetPlayerInterior( playerid, namoInfo[i][Interior] );
           return 1;
      }
   }
if( newkeys == KEY_SECONDARY_ATTACK )
   {
       if( IsPlayerInRangeOfPoint( playerid, 3.0, namoInfo[i][InterjeroX], namoInfo[i][InterjeroY], namoInfo[i][InterjeroZ] ) )
      {
           SetPlayerPos( playerid, namoInfo[i][X], namoInfo[i][Y], namoInfo[i][Z]);
           SetPlayerInterior( playerid, 0 );
           return 1;
      }
   }
return 0;
}
Код:
C:\Documents and Settings\Pawel\Desktop\TestServer\filterscripts\namusis.pwn(77) : error 017: undefined symbol "namoInfo"
C:\Documents and Settings\Pawel\Desktop\TestServer\filterscripts\namusis.pwn(77) : warning 215: expression has no effect
C:\Documents and Settings\Pawel\Desktop\TestServer\filterscripts\namusis.pwn(77) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Pawel\Desktop\TestServer\filterscripts\namusis.pwn(77) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Pawel\Desktop\TestServer\filterscripts\namusis.pwn(77) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
77 Line: if( IsPlayerInRangeOfPoint( playerid, 3.0, namoInfo[i][X], namoInfo[i][Y], namoInfo[i][Z] ) )
Reply
#2

pawn Код:
enum nInfo
{
FailoPav,
Float:X,
Float:Y,
Float:Z,
Slaptazodis,
Kaina,
Float:InterjeroX,
Float:InterjeroY,
Float:InterjeroZ,
Interior,
Virtualworld,
ID,
Nupirktas
};
new nameinfo[MAX_NAMU][nInfo];
Reply
#3

Same errors
Reply
#4

Do as luis say and replace these:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_SECONDARY_ATTACK )
   {
   for(new i; i<MAX_NAMU; i++)
   {
       if( IsPlayerInRangeOfPoint( playerid, 3.0, namoInfo[i][InterjeroX], namoInfo[i][InterjeroY], namoInfo[i][InterjeroZ] ) )
      {
           SetPlayerPos( playerid, namoInfo[i][InterjeroX], namoInfo[i][InterjeroY], namoInfo[i][InterjeroZ]);
           SetPlayerInterior( playerid, namoInfo[i][Interior] );
           return 1;
      }
   }
if( newkeys == KEY_SECONDARY_ATTACK )
   {
       if( IsPlayerInRangeOfPoint( playerid, 3.0, namoInfo[i][InterjeroX], namoInfo[i][InterjeroY], namoInfo[i][InterjeroZ] ) )
      {
           SetPlayerPos( playerid, namoInfo[i][X], namoInfo[i][Y], namoInfo[i][Z]);
           SetPlayerInterior( playerid, 0 );
           return 1;
      }
   }
return 0;
}
Reply
#5

Still don't work
Reply
#6

Do you have these lines in your script?

pawn Код:
#if defined FILTERSCRIPT
#else
#endif
If you have, then delete them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)