HELP ERRORS +REP
#1

Код:
stock LeavingSNAKE(playerid)
{
    Captured[playerid][SNAKE] = 0;
    UnderAttack[SNAKE] = 0;
    KillTimer(timer[playerid][SNAKE]);
    CountVar[playerid][SNAKE] = 25;
    GangZoneStopFlashForAll(Zone[SNAKE]);
    TextDrawHideForPlayer(playerid, CountText[playerid]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       IsPlayerCapturing[i][SNAKE] = 0;
    }
    SendClientMessage(playerid, COLOR_RED,"*You have failed to capture the Desert Airport!");
    return 1;
}
stock LeavingWF(playerid)
{
    Captured[playerid][WF] = 0;
    UnderAttack[WF] = 0;
    KillTimer(timer[playerid][WF]);
    CountVar[playerid][WF] = 25;
    GangZoneStopFlashForAll(Zone[WF]);
    TextDrawHideForPlayer(playerid, CountText[playerid]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       IsPlayerCapturing[i][WF] = 0;
    }
    SendClientMessage(playerid, COLOR_RED,"*You have failed to capture the Desert Airport!");
    return 1;
}
Quote:

pawno\include\YSI\y_hooks/impl.inc(2336) : error 025: function heading differs from prototype
pawno\include\YSI\y_hooks/impl.inc(2383) : error 025: function heading differs from prototype
pwn(10704) : warning 209: function "cmd_dskin" should return a value
pwn(12474) : warning 217: loose indentation
pwn(12486) : error 017: undefined symbol "LeavingSNAKE"
pwn(12490) : error 017: undefined symbol "LeavingWF"
pwn(12507) : warning 217: loose indentation
pwn(12507) : error 014: invalid statement; not in switch
pwn(12507) : warning 215: expression has no effect
pwn(12507) : error 001: expected token: ";", but found ":"
pwn(12507) : error 029: invalid expression, assumed zero
pwn(12507) : fatal error 107: too many error messages on one line

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


8 Errors.

Код:
stock CaptureZoneMessage(playerid, messageid)
{
    switch(messageid)
    {
       case 1:
       {
           SendClientMessage(playerid, COLOR_RED,"You cannot capture while in a vehicle!");
       }
       case 2:
       {
           SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
       }
       }
 --------------------->12507      case 3:
       {
           SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
       }
    }
    return 1;
}
Reply
#2

pawn Код:
stock CaptureZoneMessage(playerid, messageid)
{
    switch(messageid)
    {
       case 1:
       {
           SendClientMessage(playerid, COLOR_RED,"You cannot capture while in a vehicle!");
       }
       case 2:
       {
           SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
       }
       }    // <-------- What is this doing here?
       case 3:
       {
           SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
       }
    }
    return 1;
}
You have a bracket too many at least.
Reply
#3

now

Quote:

pwn(10704) : warning 209: function "cmd_dskin" should return a value
pwn(12474) : warning 217: loose indentation
pwn(12486) : error 017: undefined symbol "LeavingSNAKE"
pwn(12490) : error 017: undefined symbol "LeavingWF"
pwn(12507) : warning 217: loose indentation
pwn(12507) : error 014: invalid statement; not in switch
pwn(12507) : warning 215: expression has no effect
pwn(12507) : error 001: expected token: ";", but found ":"
pwn(12507) : error 029: invalid expression, assumed zero
pwn(12507) : 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
#4

bump
Reply
#5

case 0 1 2 ...
Reply
#6

Quote:

stock CaptureZoneMessage(playerid, messageid)
{
switch(messageid)
{
case 0:
{
SendClientMessage(playerid, COLOR_RED,"You cannot capture while in a vehicle!");
}
case 1:
{
SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
}
}
case 2:
{

SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
}
}
return 1;
}

again 6 errors
Reply
#7

The case and default statements are only valid inside the switch
statement.
Reply
#8

Knappen just told you the error, you have one too many brackets.
pawn Код:
stock CaptureZoneMessage(playerid, messageid)
{
switch(messageid)
{
case 0:
{
SendClientMessage(playerid, COLOR_RED,"You cannot capture while in a vehicle!");
}
case 1:
{
SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
}
} // Unnecessary
case 2:
{

SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
}
}
return 1;
}
Also, read the forum rules. You're allowed to bump once every 24 hours.
Reply
#9

26 errors with it
Reply
#10

Remove it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)