Little Help Please
#1

Well I was Coding a Nuke Script And I got Some Errors That I can't Spot the Mistakes
Code
pawn Код:
forward AfterMove(playerid,nuke,px,py,pz);
public AfterMove(playerid,nuke,px,py,pz)
{
    DestroyObject(nuke);
    CreateExplosion(px,py,pz,7,100);
    CreateExplosion(px,py,pz+5,7,100);
    CreateExplosion(px,py,pz+10,7,100);
    CreateExplosion(px,py,pz+15,7,100);
    CreateExplosion(px+5,py,pz,7,100);
    CreateExplosion(px+10,py,pz,7,100);
    CreateExplosion(px+15,py,pz,7,100);
    CreateExplosion(px-5,py,pz,7,100);
    CreateExplosion(px-10,py,pz,7,100);
    CreateExplosion(px-15,py,pz,7,100);
    CreateExplosion(px,py+5,pz,7,100);
    CreateExplosion(px,py+10,pz,7,100);
    CreateExplosion(px,py+15,pz,7,100);
    CreateExplosion(px,py-5,pz,7,100);
    CreateExplosion(px,py-10,pz,7,100);
    CreateExplosion(px,py-15,pz,7,100);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPVarInt(i,"isolated") = 0) // This is line 65
        {
            new Float:x,Float:y,Float:z;
            GetPlayerPos(i,x,y,z);
            if(z<50)
            {
                SetPVarInt(i,"kn",playerid+1);
                SetPlayerHealth(i,0);
            }
        }
           
    }
    return 1;
}
And The Errors
Код:
C:\Users\DELL\Desktop\nuke test.pwn(65) : warning 211: possibly unintended assignment
C:\Users\DELL\Desktop\nuke test.pwn(65) : error 022: must be lvalue (non-constant)
C:\Users\DELL\Desktop\nuke test.pwn(65) : warning 215: expression has no effect
C:\Users\DELL\Desktop\nuke test.pwn(65) : error 001: expected token: ";", but found ")"
C:\Users\DELL\Desktop\nuke test.pwn(65) : error 029: invalid expression, assumed zero
C:\Users\DELL\Desktop\nuke test.pwn(65) : fatal error 107: too many error messages on one line
Reply
#2

OLD:
pawn Код:
if(GetPVarInt(i,"isolated") = 0)
NEW:
pawn Код:
if(GetPVarInt(i,"isolated") == 0)
Also, next time describe your problem in the subject.
Reply
#3

pawn Код:
forward AfterMove(playerid,nuke,px,py,pz);
public AfterMove(playerid,nuke,px,py,pz)
{
    DestroyObject(nuke);
    CreateExplosion(px,py,pz,7,100);
    CreateExplosion(px,py,pz+5,7,100);
    CreateExplosion(px,py,pz+10,7,100);
    CreateExplosion(px,py,pz+15,7,100);
    CreateExplosion(px+5,py,pz,7,100);
    CreateExplosion(px+10,py,pz,7,100);
    CreateExplosion(px+15,py,pz,7,100);
    CreateExplosion(px-5,py,pz,7,100);
    CreateExplosion(px-10,py,pz,7,100);
    CreateExplosion(px-15,py,pz,7,100);
    CreateExplosion(px,py+5,pz,7,100);
    CreateExplosion(px,py+10,pz,7,100);
    CreateExplosion(px,py+15,pz,7,100);
    CreateExplosion(px,py-5,pz,7,100);
    CreateExplosion(px,py-10,pz,7,100);
    CreateExplosion(px,py-15,pz,7,100);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPVarInt(i,"isolated") == 0)
        {
            new Float:x,Float:y,Float:z;
            GetPlayerPos(i,x,y,z);
            if(z<50)
            {
                SetPVarInt(i,"kn",playerid+1);
                SetPlayerHealth(i,0);
            }
        }
           
    }
    return 1;
}
Reply
#4

ok thanx all and sorry about the subject
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)