Compile Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Compile Error (
/showthread.php?tid=495171)
Compile Error -
vikassharma - 16.02.2014
why it giving compile error please help me guys
C:\Users\Desktop\LuxAdmin.pwn(3951) : error 029: invalid expression, assumed zero
C:\Users\Desktop\LuxAdmin.pwn(4280) : error 029: invalid expression, assumed zero
C:\Users\Desktop\LuxAdmin.pwn(4280) : error 017: undefined symbol "F"
C:\Users\Desktop\LuxAdmin.pwn(4280) : error 029: invalid expression, assumed zero
C:\Users\Desktop\LuxAdmin.pwn(4280) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
http://pastebin.com/wujQH8rq
Re: Compile Error -
Necip - 16.02.2014
Change
pawn Код:
if(AccInfo[playerid][Level] >= 0
To:
pawn Код:
if(AccInfo[playerid][Level] >= 0)
Re: Compile Error -
vikassharma - 16.02.2014
Quote:
Originally Posted by Necip
Change
pawn Код:
if(AccInfo[playerid][Level] >= 0
To:
pawn Код:
if(AccInfo[playerid][Level] >= 0)
|
But in which dcmd_ ?
Re: Compile Error -
Necip - 16.02.2014
Line 3951.
Remove the F from line 4280 also:
pawn Код:
if(AccInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid))
Re: Compile Error -
vikassharma - 16.02.2014
Thank you so much bro
Re: Compile Error -
Necip - 16.02.2014
Can you put all your current function on pawn tags? Thanks.
Godmode ? -
vikassharma - 16.02.2014
Guys please help ...
This is godmode code
Код:
dcmd_god(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 0)
{
AccInfo[playerid][God] = 1;
SetPlayerHealth(playerid,100000);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,green,"|- GodMod ON -|");
SendClientMessage(playerid,red,"You cannot use weapons in godmode");
return SendCommandToAdmins(playerid,"God");
}
else
{
AccInfo[playerid][God] = 0;
SendClientMessage(playerid,red,"|- GodMod OFF -|");
SendClientMessage(playerid,red,"Now you can safely use your weapons");
SetPlayerHealth(playerid, 100);
}
return GivePlayerWeapon(playerid,29,500);
}
It's working but how to block /w command so that player cannot get weapon by using this command ?
Re: Godmode ? -
Kyance - 16.02.2014
Quote:
Originally Posted by vikassharma
Guys please help ...
This is godmode code
Код:
dcmd_god(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 0)
{
AccInfo[playerid][God] = 1;
SetPlayerHealth(playerid,100000);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,green,"|- GodMod ON -|");
SendClientMessage(playerid,red,"You cannot use weapons in godmode");
return SendCommandToAdmins(playerid,"God");
}
else
{
AccInfo[playerid][God] = 0;
SendClientMessage(playerid,red,"|- GodMod OFF -|");
SendClientMessage(playerid,red,"Now you can safely use your weapons");
SetPlayerHealth(playerid, 100);
}
return GivePlayerWeapon(playerid,29,500);
}
It's working but how to block /w command so that player cannot get weapon by using this command ?
|
pawn Код:
//The /w script here
if(AccInfo[playerid][God] == 1) return SendClientMessage(playerid, -1, "* You can't use /w while in God-Mode!");
//rest of script here
Re: Godmode ? -
vikassharma - 16.02.2014
Quote:
Originally Posted by Kyance
pawn Код:
//The /w script here if(AccInfo[playerid][God] == 1) return SendClientMessage(playerid, -1, "* You can't use /w while in God-Mode!"); //rest of script here
|
But this will only show message it will not block /w usage right ?
Re: Compile Error -
rakshith122 - 16.02.2014
Could you show me /w? I cant open that pastebin on my PC. Old PC.