What is wrong with this? :D
#1

what is wrong with this D:
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR:Only admins can use this command!");
   if(strcmp(cmd, "/kick", true) ==0) {
   new giveid, reason[128];
   if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
   if(giveid == INVALID_PLAYER_ID)return SendClientMessage(playerid, -1, "ERROR:This player isn't connected!");
   else
   {
   new gname[MAX_PLAYER_NAME];
   GetPlayerName(giveid, gname, sizeof(gname));
   GetPlayerName(playerid, pName, sizeof(pName));
   format(string, sizeof(string), "ADMIN KICK : %s has been kicked From The Server ( Reason : %s)", gname,reason);
   SendClientMessageToAll(COLOR_PINK, string);
   Kick(giveid);
   }
   return 1;
   }






errors:
pawn Код:
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm.pwn(2601) : error 076: underfined symbol "params".
2601 line is this:
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Reply
#2

Show us your line 2601.
Reply
#3

help please
Reply
#4

I dont think you have 'paramas'
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Params should work
Reply
#5

no i just edited it now fast in here and made it by mistake "paramas"its actually say "params"..
Reply
#6

Why at the whole code it's
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
And at this you wrote "2601 line is this:" it's
pawn Код:
if(sscanf(paramas, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Reply
#7

to grapsa katala7os to ksanaftia3a..sthn biasynh mou :P
Reply
#8

strcmp doesnt have 'params'. As youre using 'cmd' or 'cmdtext' in strcmp, you should change the params to 'cmd' or 'cmdtext'. I dont know what youre using for that, so try it yourself.
Reply
#9

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
strcmp doesnt have 'params'. As youre using 'cmd' or 'cmdtext' in strcmp, you should change the params to 'cmd' or 'cmdtext'. I dont know what youre using for that, so try it yourself.
will you believe that i didnt notice that i was using strcmp?thx btw wesley it is compiled: DDD
EDIT: when i am going to kick an invalid id .it doesnt say :"Invalid player id "it says "Kick [playerid] [reason] and when i am writing the reason too it says the same thing again D:

P.S : Make more tutorials please it helps a lot and lot people too : DD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)