[HELP] invalid expression assumed zero
#1

I have that error on this line


pawn Код:
if(back == 0)

and know this is the all code:


pawn Код:
public OnPlayerEscapeDMZona(playerid,back)
{
    if(gPlayerLogged[playerid] != 1) return 1;
    if(back == 0)
    else
    {
        if(PlayerInfo[playerid][pDM] == 1)
        {
            SCM(playerid,ZUTA,"[OOC DM Zona] Vraceni ste nazad!Ukoliko zelite napustiti OOC DM Zonu koristi /dmexit!");
            SetPlayerPos_H(playerid,424.3157,2536.3532,15.6639);
            DMBjezanje[playerid] = 0;
        }
        if(PlayerInfo[playerid][pDM] == 2)
        {
            SCM(playerid,ZUTA,"[OOC DM Zona] Vraceni ste nazad!Ukoliko zelite napustiti OOC DM Zonu koristi /dmexit!");
            SetPlayerPos_H(playerid,-723.9285,2338.4038,126.1309);
            DMBjezanje[playerid] = 0;
        }
    }
    return 1;
}
Reply
#2

What exactly is this suppost to do, so I can get a better grasp on it
Reply
#3

Код:
public OnPlayerEscapeDMZona(playerid,back)
{
    if(gPlayerLogged[playerid] != 1) return 1;
    if(back == 0){}
    else
    {
        if(PlayerInfo[playerid][pDM] == 1)
        {
            SCM(playerid,ZUTA,"[OOC DM Zona] Vraceni ste nazad!Ukoliko zelite napustiti OOC DM Zonu koristi /dmexit!");
            SetPlayerPos_H(playerid,424.3157,2536.3532,15.6639);
            DMBjezanje[playerid] = 0;
        }
        if(PlayerInfo[playerid][pDM] == 2)
        {
            SCM(playerid,ZUTA,"[OOC DM Zona] Vraceni ste nazad!Ukoliko zelite napustiti OOC DM Zonu koristi /dmexit!");
            SetPlayerPos_H(playerid,-723.9285,2338.4038,126.1309);
            DMBjezanje[playerid] = 0;
        }
    }
    return 1;
}
?
Reply
#4

He meant something like this:

pawn Код:
if(gPlayerLogged[playerid] != 1) return 1;
    if(back[playerid] > 0)
    {
        if(PlayerInfo[playerid][pDM] == 1)
        {
Reply
#5

This public is for detecting players who leave death match zone if the player is in it.
Reply
#6

Try using only on‌e = ? Example if(back = 0)
Reply
#7

Код:
if(back == 0){}
The solution was already given by Rolux.

You can't have an empty block of code below an if-statement.
If it shouldn't do anything (no code), then put this after it: {}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)