What's problem with this?
#1

pawn Код:
new
    SuperJumpEnabled[MAX_PLAYERS] = 0;
    Float:pX,
    Float:pY,
    Float:pZ,
    IsJumping[MAX_PLAYERS];
forward IsJmping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(SuperJumpEnabled[playerid] == 0) {
    SuperJumpEnabled[playerid] = 1;
    else {
         SuperJumpEnabled[playerid] = 0;
         SendClientMessage(playerid, COLOR_TEXT, "[System]:Super Jump is Disabled");
    if(newkeys == KEY_JUMP && !IsJumping[playerid]);
    {
        IsJumping[playerid]=1;
        GetPlayerVelocity(playerid,pX,pY,pZ);
        SetPlayerVelocity(playerid,pX,pY,pZ+0.4);
        SetTimerEx("IsJmping",2500,false,"d",playerid);
    }
    return 1;
}
public IsJmping(playerid)
{
    IsJumping[playerid]=0;
}
Код:
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(207) : error 010: invalid function or declaration
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : warning 217: loose indentation
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : error 017: undefined symbol "IsJumping"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : warning 215: expression has no effect
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : error 001: expected token: ";", but found "]"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(219) : fatal error 107: too many error messages on one line

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


6 Errors.
Kindly if possible tell me what's the problem, so i don't make the same mistake next time.
Reply
#2

pawn Код:
new IsJumping[MAX_PLAYERS];
Reply
#3

i have it already
Reply
#4

pawn Код:
forward IsJmping(playerid);
pawn Код:
public IsJmping(playerid)
Mis spelt jumping ?
Reply
#5

O: let me see..
Reply
#6

Hm..
pawn Код:
new
    SuperJumpEnabled[MAX_PLAYERS] = 0;
    Float:pX,
    Float:pY,
    Float:pZ,
    IsJumping[MAX_PLAYERS];
forward IsJumping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(SuperJumpEnabled[playerid] == 0) {
    SuperJumpEnabled[playerid] = 1;
    else {
         SuperJumpEnabled[playerid] = 0;
         SendClientMessage(playerid, COLOR_TEXT, "[System]:Super Jump is Disabled");
    if(newkeys == KEY_JUMP && !IsJumping[playerid]);
    {
        IsJumping[playerid]=1;
        GetPlayerVelocity(playerid,pX,pY,pZ);
        SetPlayerVelocity(playerid,pX,pY,pZ+0.4);
        SetTimerEx("IsJumping",2500,false,"d",playerid);
    }
    return 1;
}
public IsJumping(playerid)
{
    IsJumping[playerid]=0;
}
Код:
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(208) : error 010: invalid function or declaration
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(217) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : warning 217: loose indentation
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : error 028: invalid subscript (not an array or too many subscripts): "IsJumping"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : warning 215: expression has no effect
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : error 001: expected token: ";", but found "]"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(220) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply
#7

i think i had it wrong.. what about it now?
I don't know what these error's means...
pawn Код:
new
    SuperJumpEnabled[MAX_PLAYERS];
    Float:pX, //208
    Float:pY,
    Float:pZ,
    IsJumping[MAX_PLAYERS];
forward IsJumping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(SuperJumpEnabled[playerid]) = 1; //215
    if(newkeys == KEY_JUMP && !IsJumping[playerid]); //216
    {
        IsJumping[playerid]=1;
        GetPlayerVelocity(playerid,pX,pY,pZ);
        SetPlayerVelocity(playerid,pX,pY,pZ+0.4);
        SetTimerEx("IsJumping",2500,false,"d",playerid);
    else {
         SuperJumpEnabled[playerid] = 0;
         SendClientMessage(playerid, COLOR_TEXT, "[System]:Super Jump is Disabled");
    }
    return 1;
}
public IsJumping(playerid)
{
    IsJumping[playerid]=0;
}
Код:
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(208) : error 010: invalid function or declaration
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(215) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(215) : warning 215: expression has no effect
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : error 028: invalid subscript (not an array or too many subscripts): "IsJumping"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : warning 215: expression has no effect
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : error 001: expected token: ";", but found "]"
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\PAWN\gamemodes\Crysis.pwn(216) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply
#8

Two brackets are not closed.
Reply
#9

Which? -.-, i tried but didn't found it
OT: didn't knew even making one CMD will be like this
Reply
#10

Try compiling this

pawn Код:
new SuperJumpEnabled[MAX_PLAYERS], Float:pX, Float:pY, Float:pZ, IsJumping[MAX_PLAYERS];

forward IsJumping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{    
    if(SuperJumpEnabled[playerid]) = 1;  
    else if(newkeys == KEY_JUMP && !IsJumping[playerid]);
    {
        IsJumping[playerid]=1;        
        GetPlayerVelocity(playerid,pX,pY,pZ);        
        SetPlayerVelocity(playerid,pX,pY,pZ+0.4);        
        SetTimerEx("IsJumping",2500,false,"d",playerid);  
    }
    else
    {        
        SuperJumpEnabled[playerid] = 0;        
        SendClientMessage(playerid, COLOR_TEXT, "[System]:Super Jump is Disabled");    
    }    
    return 1;
}
public IsJumping(playerid)
{    
    IsJumping[playerid] = 0;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)