Command Problem
#1

Code
Код HTML:
else if(strcmp(cmd, "/armor", true) == 0)
	{
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /sethp [id] [уровень hp]");
	    new playerrr;
	    new armour;
		playerrr = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		armor = strval(tmp);
		if(PlayerInfo[playerid][pAdmin] >= 5)
		{
		    if(IsPlayerConnected(playerrr))
		    {
		        if(playerrr != INVALID_PLAYER_ID)
		        {
		            SetPlayerHealthAC(playerrr, armor);
		            SetPlayerArmour(playerid, 100)
		            PlayerInfo(playerrr][pHP] = armor;
		            SendClientMessage(playerid, COLOR_WHITE, "Motamashis Armor Dayenda");
				}
			}
		}
Error 26 @@@@

Код HTML:
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(1145) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(1178) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2283) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2284) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2285) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2286) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2287) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2288) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2323) : error 017: undefined symbol "SetPlayerArmourAC"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2324) : error 004: function "DelGun" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2329) : error 017: undefined symbol "GiveAcGun"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2354) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2369) : error 004: function "DelGun" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2403) : error 017: undefined symbol "SetPlayerHealthAC"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2414) : error 017: undefined symbol "SetPlayerHealthAC"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2425) : error 017: undefined symbol "SetPlayerHealthAC"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2433) : error 017: undefined symbol "SetPlayerHealthAC"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2442) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2610) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2975) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2984) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(2998) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(3015) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(3371) : error 017: undefined symbol "printr"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(3410) : error 017: undefined symbol "PlayerToKvadrat"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(3494) : error 004: function "SaveZones" is not implemented

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


26 Errors.
i made this command like this from my amx
Код HTML:
else if(strcmp(cmd, "/sethp", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /sethp [id] [уровень hp]");
		new playa;
		new health;
		playa = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		health = strval(tmp);
		if (PlayerInfo[playerid][pAdmin] >= 5)
		{
			if(IsPlayerConnected(playa))
			{
				if(playa != INVALID_PLAYER_ID)
				{
					SetPlayerHealthAC(playa, health);
					PlayerInfo[playa][pHP] = health;
					SendClientMessage(playerid, COLOR_WHITE, "Уровень hp игроку установлен");
				}
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Вы не уполномочены использовать эту команду!");
		}
	}
thanks <3 if you can help
Reply
#2

pawn Код:
else if(strcmp(cmd, "/armor", true) == 0)
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /sethp [id] [уровень hp]");
    new playerrr;
    new armour;
    playerrr = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    armor = strval(tmp);
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        if(IsPlayerConnected(playerrr))
        {
            if(playerrr != INVALID_PLAYER_ID)
            {
                SetPlayerHealthAC(playerrr, armor);
                SetPlayerArmour(playerid, 100)
                PlayerInfo(playerrr][pHP] = armor;
                SendClientMessage(playerid, COLOR_WHITE, "Motamashis Armor Dayenda");
            }
        }
    }
}
Reply
#3

i got this errors now


Код HTML:
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46194) : error 017: undefined symbol "armor"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46201) : error 017: undefined symbol "armor"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 012: invalid function call, not a valid address
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : warning 215: expression has no effect
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 001: expected token: ";", but found "]"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : 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

guys this is my error line what this


Код HTML:
PlayerInfo(playerrr][pHP] = armour);

Код HTML:
C:\UseC:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 012: invalid function call, not a valid address
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : warning 215: expression has no effect
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 001: expected token: ";", but found "]"
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#5

Change it to:
pawn Код:
PlayerInfo[playerrr][pHP] = armour;
Reply
#6

Код HTML:
C:\Users\Gigi\Desktop\America Life\gamemodes\AvangardRolePlay.pwn(46203) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
this error i got now
Reply
#7

The line above this is:
pawn Код:
SetPlayerArmour(playerid, 100)
You forgot to add ";".
Change it to:
pawn Код:
SetPlayerArmour(playerid, 100);
Reply
#8

it works thanks ++ rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)