some errors while compile
#1

Код:
C:\Users\ANSH\Desktop\MW3SAMP-master\MW3SAMP-master\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)")
C:\Users\ANSH\Desktop\REGISTER\SvsG.pwn(182) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\ANSH\Desktop\REGISTER\SvsG.pwn(182) : warning 215: expression has no effect
C:\Users\ANSH\Desktop\REGISTER\SvsG.pwn(182) : error 001: expected token: ";", but found "]"
C:\Users\ANSH\Desktop\REGISTER\SvsG.pwn(182) : error 029: invalid expression, assumed zero
C:\Users\ANSH\Desktop\REGISTER\SvsG.pwn(182) : fatal error 107: too many error messages on one line

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


4 Errors.
my code

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  	if(PRESSED(KEY_WALK))
 	{
 	    if(gTeam[playerid] == TEAM_AVENGERS)
 	    {
  			if(pInfo[playerid][pAvengersClass] == SPIDERMAN)
  			{
  			    {
					new Float:x,Float:y,Float:z;
					GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
   					SetPlayerVelocity(playerid,Float:x,Float:y*0.9,Float:z+0.5* 0.9);
   				}
   			}
   		}
   	}
   	return 1;
}
Reply
#2

Have you defined pAvengersClass? As that'd probably cause this.
Reply
#3

enum pInfo
{
pPass,
pCash,
pAdmin,
pAvengersClass,
pJusticeClass,
pKills,
pDeaths
}


also can you gimme another example to get players class?
Reply
#4

You've got the setup right, it's about that enum usage or creation.


Do you have any #defines that are related to this code? Like pAvengersClass, or SPIDERMAN.
Reply
#5

i have

//Teams
#define TEAM_AVENGERS 0
#define TEAM_JUSTICE_LEAGUE 1

AND

//CLASSES
#define DEADPOOL 0
#define SPIDERMAN 1
Reply
#6

What about pInfo's declaration?
Reply
#7

what?
Reply
#8

PlayerInfo[MAX_PLAYERS][pInfo];
Have you got something like that?
Reply
#9

yes i have
Reply
#10

I guess it should be PlayerInfo[playerid][pAvengersClass] == SPIDERMAN
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)