Lol error ban :-j - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lol error ban :-j (
/showthread.php?tid=181416)
Lol error ban :-j -
eXtr1kE - 05.10.2010
OMG, added in ban command :
pawn Код:
if (params(sendername,"eXtrike",true))
{
format(string, sizeof(string), "AdmCmd: %s was banned by Guardian, reason: Fucked by eXtrike", playerid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Ban(playerid);
return 1;
}
and errors :
Код:
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : error 012: invalid function call, not a valid address
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : warning 215: expression has no effect
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : warning 215: expression has no effect
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : warning 215: expression has no effect
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : error 001: expected token: ";", but found ")"
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : error 029: invalid expression, assumed zero
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11001) : 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: Lol error ban :-j -
Sascha - 05.10.2010
it would be helpfull if you'd say in which line the error is as we don't know which line is 11001,
however I think your first posted line is wrong:
if(params(sendername, "eXtrike", true))
change it to:
Код:
if(!strcmp(sendername, "eXstrike", true))
{
Re: Lol error ban :-j -
Sascha - 05.10.2010
Quote:
Originally Posted by Elder_of_Zion
pawn Код:
if(!strcmp(sendername, "eXstrike", true) {
|
wrong!
you forgot a ")"... take the 1 I sent, that'll work...
as long as you have the "sendername" defined
Re: Lol error ban :-j -
Sascha - 05.10.2010
dude...
think logic once...
if(!strcmp(sendername, "eXstrike", true) has 2 ( but only 1 ) in your script... how should that work?...
the ) you wrote just closes the "sendername, exstrike, true" part.... now there's still the "!strcmp" part open...
just try it with the thing I wrote and you won't get any errors...
Re: Lol error ban :-j -
••• ĤБĶБM ••• - 05.10.2010
Replace:
Код:
if(!strcmp(sendername, "eXstrike", true)
{
With:
Код:
if(!strcmp(sendername, "eXstrike", true))
{
Re: Lol error ban :-j -
Mike_Peterson - 05.10.2010
Lol @Elder and @Sascha
arguing on a topic without the owner (extrike) even commented yet xD
Re: Lol error ban :-j -
eXtr1kE - 05.10.2010
Man, my command is in zcmd
Re: Lol error ban :-j -
Sascha - 05.10.2010
Quote:
Originally Posted by eXtr1kE
Man, my command is in zcmd
|
so?... just use the code I posted instead of your if(!params(......)){
Re: Lol error ban :-j -
Scenario - 05.10.2010
Post your entire command, you've probably screwed something up.
Re: Lol error ban :-j -
LarzI - 05.10.2010
And FYI guys; if he wants 'eXtrike' namecheck, the 'true' is incorrectly placed.
Correct:
pawn Код:
if(!strcmp(sendername, "eXtrike")) //we don't need to add ', false' since that's set by default