some errors while compile - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: some errors while compile (
/showthread.php?tid=656175)
some errors while compile -
Neom - 09.07.2018
Код:
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;
}
Re: some errors while compile -
Sew_Sumi - 09.07.2018
Have you defined pAvengersClass? As that'd probably cause this.
Re: some errors while compile -
Neom - 09.07.2018
enum pInfo
{
pPass,
pCash,
pAdmin,
pAvengersClass,
pJusticeClass,
pKills,
pDeaths
}
also can you gimme another example to get players class?
Re: some errors while compile -
Sew_Sumi - 09.07.2018
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.
Re: some errors while compile -
Neom - 09.07.2018
i have
//Teams
#define TEAM_AVENGERS 0
#define TEAM_JUSTICE_LEAGUE 1
AND
//CLASSES
#define DEADPOOL 0
#define SPIDERMAN 1
Re: some errors while compile -
Dayrion - 09.07.2018
What about pInfo's declaration?
Re: some errors while compile -
Neom - 09.07.2018
what?
Re: some errors while compile -
Mike861 - 09.07.2018
PlayerInfo[MAX_PLAYERS][pInfo];
Have you got something like that?
Re: some errors while compile -
Neom - 09.07.2018
yes i have
Re: some errors while compile -
Mike861 - 09.07.2018
I guess it should be PlayerInfo[playerid][pAvengersClass] == SPIDERMAN