Lol error ban :-j
#1

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.
Reply
#2

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))
{
Reply
#3

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
Reply
#4

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...
Reply
#5

Replace:
Код:
if(!strcmp(sendername, "eXstrike", true)
{
With:
Код:
if(!strcmp(sendername, "eXstrike", true))
{
Reply
#6

Lol @Elder and @Sascha
arguing on a topic without the owner (extrike) even commented yet xD
Reply
#7

Man, my command is in zcmd
Reply
#8

Quote:
Originally Posted by eXtr1kE
Посмотреть сообщение
Man, my command is in zcmd
so?... just use the code I posted instead of your if(!params(......)){
Reply
#9

Post your entire command, you've probably screwed something up.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)