Help Please Error 029 PAWNO -
DaRkAnGeL[NBK] - 06.10.2011
Hi There,
i was trying to script a admin vehicle to work with the admin system i use which is LuxAdmin V1.5 i did all i used to which was
Код:
Admin_Vehicle = CreateVehicle(415,1544.1481,-1659.2570,5.6624,89.9421,0,0,5000);
Код:
if(vehicleid == Admin_Vehicle && !IsPlayerAdmin(playerid))
{
ClearAnimations(playerid);
SendClientMessage(playerid, 0xAA3333AA, "This vehicle is for admins only!");
}
Then because i dont have a built in admin system tryed to edit to let admin players enter not just Rcon admins so did all the same apart from the end code
Код:
if(vehicleid = Admin_Vehicle && (AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
ClearAnimations(playerid);
SendClientMessage(playerid, 0xAA3333AA, "This vehicle is for admins only!");
}
But i get this error:
Код:
C:\Users\.....\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : warning 217: loose indentation
C:\Users\......\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : warning 211: possibly unintended assignment
C:\Users\......\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7840) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Does anyone know what is wrong ? if you do please reply i would be most please.
Thanks
Re: Help Please Error 029 PAWNO -
TheLazySloth - 06.10.2011
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid) && vehicleid = Admin_Vehicle)
{
ClearAnimations(playerid);
SendClientMessage(playerid, 0xAA3333AA, "This vehicle is for admins only!");
}
Re: Help Please Error 029 PAWNO -
DaRkAnGeL[NBK] - 06.10.2011
Thank you very much for the fast reply i added it but did i add it wrong ? because i get 4errors now
Код:
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : warning 217: loose indentation
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : warning 211: possibly unintended assignment
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : error 022: must be lvalue (non-constant)
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : warning 215: expression has no effect
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : error 001: expected token: ";", but found ")"
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\filterscripts\LuxAdmin.pwn(7839) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Help Please Error 029 PAWNO -
TheLazySloth - 06.10.2011
Can you post the whole code around the edited code?
Re: Help Please Error 029 PAWNO -
DaRkAnGeL[NBK] - 06.10.2011
never mind i fixed it the correct code was
Код:
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid) && (vehicleid = Admin_Vehicle))
{
ClearAnimations(playerid);
SendClientMessage(playerid, 0xAA3333AA, "This vehicle is for admins only!");
}
thanks very much
Re: Help Please Error 029 PAWNO -
TheLazySloth - 06.10.2011
I didn't think that needed () xD hmmm weird, oh well.
Re: Help Please Error 029 PAWNO -
Pharrel - 06.10.2011
when you use 'or' and 'and' in the same condition you have to isolate them
Re: Help Please Error 029 PAWNO -
TheLazySloth - 06.10.2011
The More You Know
Aha... Thanks.
Re: Help Please Error 029 PAWNO -
Pharrel - 06.10.2011
kkkkk nothing
Re: Help Please Error 029 PAWNO -
cyber_punk - 06.10.2011
No one else here spotted the single = ? When checking a value that should be equal to, you need to use 2 = signs so it should be
pawn Код:
if(vehicleid == Admin_Vehicle && (AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
ClearAnimations(playerid);
SendClientMessage(playerid, 0xAA3333AA, "This vehicle is for admins only!");
}