Need Help! Small Problem.
#1

Hello All! I Have A Small Problem. When I Write This:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp("/LSPD", cmdtext, true, 10) == 0)
		{
			SendClientMessage(playerid, COLOR_YELLOW, "Shen Shexvedi LSPD-Shi!");
			pTeam[playerid] = team_lspd;
			return 1;
		}
		if (strcmp("/myteam", cmdtext, true, 10) == 0)
		{
			if(pTeam[playerid] == team_lspd) {
			SendClientMessage(playerid, COLOR_YELLOW, "Shen Xar LSPD's Officeri!");
			return 1;
		if(pTeam[playerid] == team_grove{
		SendClientMessage(playerid, COLOR_YELLOW, "Shen Ukve Xar Grove's Wevri!");
		return 1;
		}
	return 1;
}
After Saving is Warning This:
Код:
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(532) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(532) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(540) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(540) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(545) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(545) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(545) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(550) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(550) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(550) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(555) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(555) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(555) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(560) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(560) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(560) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(565) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(565) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(565) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(570) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(570) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(570) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(575) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(575) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(575) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(580) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(580) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(580) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(585) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(585) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(585) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(590) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(590) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(590) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(595) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(595) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(595) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(600) : warning 225: unreachable code
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(600) : error 029: invalid expression, assumed zero

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


26 Errors.
Please TellMe Where Have I Warning..?


FIXED!
Reply
#2

Missing a bracket.
try this
pawn Код:
Edited out.
EDIT

try this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/LSPD", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Shen Shexvedi LSPD-Shi!");
        pTeam[playerid] = team_lspd;
        return 1;
    }
    if (strcmp("/myteam", cmdtext, true, 10) == 0)
    {
        if(pTeam[playerid] == team_lspd)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Shen Xar LSPD's Officeri!");
            return 1;
        }
        if(pTeam[playerid] == team_grove
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Shen Ukve Xar Grove's Wevri!");
            return 1;
        }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Deal-or-die
Посмотреть сообщение
Missing a bracket.
try this
pawn Код:
Clear
EDIT

try this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp("/LSPD", cmdtext, true, 10) == 0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Shen Shexvedi LSPD-Shi!");
            pTeam[playerid] = team_lspd;
            return 1;
        }
        if (strcmp("/myteam", cmdtext, true, 10) == 0)
        {
            if(pTeam[playerid] == team_lspd)
            {
                SendClientMessage(playerid, COLOR_YELLOW, "Shen Xar LSPD's Officeri!");
                return 1;
            }
            if(pTeam[playerid] == team_grove
            {
                SendClientMessage(playerid, COLOR_YELLOW, "Shen Ukve Xar Grove's Wevri!");
                return 1;
            }
        }
    return 1;
}
Thank You But Now Is This 1 Error:

Код:
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(535) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Ahh, I just updated my previous code to tidy up the indentation so grab thats again.

Also, Which line is 535?


(Also another suggestion is to use a different command processor such as zcmd or y_cmd)
Reply
#5

Replace this

pawn Код:
if(pTeam[playerid] == team_grove
to this

pawn Код:
if(pTeam[playerid] == team_grove)
Reply
#6

Nice spotting, didn't see that.
Reply
#7

Thanks Now Is Only This Errors:

Quote:

C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(552) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\TwisTa\Рабочий стол\BIG CITY LIFE OFFICIAL AMX\gamemodes\BCL.pwn(553) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

I'm Lamer :XXX :@
Reply
#8

Not not! I fixed This!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)