11.05.2017, 23:15
FBS.pwn(190) : warning 213: tag mismatch
FBS.pwn(19 : warning 213: tag mismatch
FBS.pwn(22 : error 017: undefined symbol "vec"
FBS.pwn(22 : warning 215: expression has no effect
FBS.pwn(22 : error 001: expected token: ";", but found "]"
FBS.pwn(22 : error 029: invalid expression, assumed zero
FBS.pwn(22 : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Errors on this
Line 228
FBS.pwn(19 : warning 213: tag mismatch
FBS.pwn(22 : error 017: undefined symbol "vec"
FBS.pwn(22 : warning 215: expression has no effect
FBS.pwn(22 : error 001: expected token: ";", but found "]"
FBS.pwn(22 : error 029: invalid expression, assumed zero
FBS.pwn(22 : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Errors on this
PHP код:
enum aname
{
SuperPower
}
new Abilitys[MAX_PLAYERS][aname];
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(newkeys & KEY_WALK))
{
if(gettime() - 6 < Abilitys[playerid][SuperPower])return GameTextForPlayer(playerid,"~w~ Power Recharging!",1000,5);
ApplyAnimation(playerid,"ped","Shove_Partial",3.9,0,1,1,1,1,1);
SetPlayerAttachedObject(playerid,0,18683,6);
SetPlayerAttachedObject(playerid,1,18728,6);
SetPlayerAttachedObject(playerid,2,338,6);
Abilitys[playerid][SuperPower] = gettime();
{
for( new i = 0; i < MAX_PLAYERS; i++ )
if(GetDistanceBetweenPlayers(playerid,i) < 6.0)
{
GetPlayerFacingAngle(i,vec[3]); GetPlayerVelocity(i,vec[0],vec[1],vec[2]); SetPlayerVelocity(i,vec[0]+0.3,vec[1]+0.3,vec[2]+0.2);
SetPlayerFacingAngle(i,vec[3]);
}
}
}
public Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) {
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub?(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
return 1;
}
}
Код:
GetPlayerFacingAngle(i,vec[3]); GetPlayerVelocity(i,vec[0],vec[1],vec[2]); SetPlayerVelocity(i,vec[0]+0.3,vec[1]+0.3,vec[2]+0.2);