please help me in this
#1

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new playerinfight[Target]=1; // let the system know that heґs in fight
    return 1;
}
pawn Код:
if (strcmp("/bsj5", cmdtext, true, 10) == 0)
    {
        if(playerinfight[Target]=1;)return SendClientMessage(playerid, 0x007F00FF, "You in fight");
        new pName[MAX_PLAYER_NAME];
        DynUpdateStart(playerid);
        SetPlayerPos(playerid,2587.1448,1352.4722,78.4764);
        SetPlayerFacingAngle(playerid, 177.6544);
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELE: %s has teleported to Base Jump 5 (/bsj5) ", pName);
        SendClientMessageToAll(COLOR_CYAN, string);
    return 1;
    }
showing errors and warning how to remove this
Код:
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(1261) : error 017: undefined symbol "playerinfight"
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(1261) : error 017: undefined symbol "Target"
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(1261) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(1261) : 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
#2

pawn Код:
new playerinfight[MAX_PLAYERS];

public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    playerinfight[Target] = 1; // let the system know that heґs in fight
    return 1;
}

if (strcmp("/bsj5", cmdtext, true) == 0)
    {
        if(playerinfight[playerid] = 1)return SendClientMessage(playerid, 0x007F00FF, "You're In a Fight");
        new pName[MAX_PLAYER_NAME];
        DynUpdateStart(playerid);
        SetPlayerPos(playerid,2587.1448,1352.4722,78.4764);
        SetPlayerFacingAngle(playerid, 177.6544);
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELE: %s has teleported to Base Jump 5 (/bsj5) ", pName);
        SendClientMessageToAll(COLOR_CYAN, string);
    return 1;
}
Reply
#3

Код:
C:\Documents and Settings\Prabhat\Desktop\World Stunting         V1.3.5\pawno\include\opsp.inc(113) : warning 219: local variable "health" shadows a variable at a preceding level
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(1201) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
After putting above code it showing this
Reply
#4

Do the same thing like you did in the previous post:

Example;

PHP код:
new health;
public 
OnPlayerConnect(playerid)
{
   new 
health;

Reply
#5

NVM kush is on the job
Reply
#6

you have a

new health; somewhere before in the script..
and the second error is about indentation
Reply
#7

Quote:
Originally Posted by emokidx111
Посмотреть сообщение
you have a

new health; somewhere before in the script..
and the second error is about indentation
No, he basically has it out of the destined callback or function (most notably as global variable).
Reply
#8

Код:
///////////////////pickups////////////
new health[4];
new Armor[2];
I m using in array format
Reply
#9

Quote:
Originally Posted by MA_proking
Посмотреть сообщение
Код:
///////////////////pickups////////////
new health[4];
new Armor[2];
I m using in array format
You either have more of the same variables defined into your function, or it's placed globally. Remove anything that has 'new health' outside of either commands, callbacks or functions. You receive that error because the compiler can't process both variables with the same name, cause it simply wouldn't know what to call!
Reply
#10

There is nothing new health
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)