Errors
#1

I got errors, and I don't know how to fix them. I've been trying to fix it for 1hour...

PHP код:
CMD:kick(playeridparams[])
{
   if(
IsPlayerAdmin(playerid))
   {
   new 
targetplayerreason[64];
   if(
sscanf(params"is[64]"targetplayerreason))
   
SendClientMessage(playeridCOLOR_ORANGE"USAGE: /kick [ID] [REASON]");
   }
   if(
targetplayer == playerid)
   {
   
SendClientMessage(playeridCOLOR_RED"You cannot kick yourself!");
   }
   else
   {
   
SendClientMessage(playeridCOLOR_RED"You kicked X");
   
SendClientMessage(targetplayerCOLOR_RED"You have been kicked by admin X for REASON");
   
Kick(targetplayer);
   }
   }
   else
   {
   
SendClientMessage(playerid, -1"SERVER: Unknown command.");
   }
   return 
1;

Errors:
PHP код:
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(369) : error 017undefined symbol "sscanf"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(368) : warning 203symbol is never used"targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(368 -- 372) : error 017undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(379) : error 017undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(380) : error 017undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(383) : error 010invalid function or declaration
C
:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(387) : error 010invalid function or declaration
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
6 Errors

Reply
#2

Do you have sscanf2 include defined??
Reply
#3

Check the line, and read what the error has said.
Reply
#4

I don't have any sscanf .inc , forgot that.
Can someone share the sscanf .inc ?
Reply
#5

Quote:
Originally Posted by saffierr
Посмотреть сообщение
I don't have any sscanf .inc , forgot that.
Can someone share the sscanf .inc ?
https://sampforum.blast.hk/showthread.php?tid=120356
Код:
#include <sscanf2>
Reply
#6

I downloaded it, and extracted it into pawno includes, and in plugins.
.. still errors
Reply
#7

You need to include it in your script by doing #include <sscanf2> in the top of your script.
Reply
#8

Oh yeah, forgot to #include that.
I did it, the following errors I receive are:
Quote:

C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(389) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(396) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(397) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(400) : error 010: invalid function or declaration
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(404) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Reply
#9

wop nvm
Reply
#10

Can someone explain me why I got those errors?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)