Raised This Month: $ Target: $400
 0% 

Error while compiling codes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matchaboy
Senior Member
Join Date: Jun 2013
Location: Bananaland
Old 10-19-2013 , 06:41   Error while compiling codes
Reply With Quote #1

Hey guys, i got these errors while trying to compile a code. Can anyone help me?

/groups/sourcemod/upload_tmp/textKrRPsB.sp(14 -- 15) : error 017: undefined symbol "name"
/groups/sourcemod/upload_tmp/textKrRPsB.sp(23) : error 017: undefined symbol "report_players"
/groups/sourcemod/upload_tmp/textKrRPsB.sp(24) : error 037: invalid string (possibly non-terminated string)
/groups/sourcemod/upload_tmp/textKrRPsB.sp(24 -- 25) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textKrRPsB.sp(26) : error 017: undefined symbol "Command_Report"
/groups/sourcemod/upload_tmp/textKrRPsB.sp(27) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textKrRPsB.sp(31) : warning 204: symbol is assigned a value that is never used: "IsEnabled"
/groups/sourcemod/upload_tmp/textKrRPsB.sp(31 -- 33) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textKrRPsB.sp(31 -- 35) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textKrRPsB.sp(31 -- 37) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textKrRPsB.sp(31 -- 37) : fatal error 127: too many error messages on one line

Please help!

PHP Code:
 #include <sourcemod>
#include <sdktools>

new Handle:report_enable INVALID_HANDLE;
new 
String:Arg1[32];
new 
String:Arg2[64];
new 
String:playername[50]; 
new 
String:steamid[50]; 
new 
String:datevar[50]; 
new 
String:timevar[50]; 
new 
String:message[999];

public 
Pluginmyinfo =
{
          
name "Player report",          
          
author "Matcha",
          
description "Enable players to report to server admin about players against rules",
          
url "www.sourcemod.net",
};

public 
OnPluginStart()
{
         
RegConsoleCmd("sm_report"report_players"Allow players to report about rude players.");
         
report_enable CreateConVar("sm_report_enable""1""1 = Enabled, 0 = Disabled"FCVAR_NOTIFY");
         AutoExecConfig(true, "
Player_Report.cfg");
         AddCommandListener(Command_Report, "
sm_report");
};  

public OnClientPutInServer(client)
{
    new IsEnabled = GetConVarInt(report_enable);         
            
};

public Action:sm_report(client, const String:command[], args);
{
       if(args < 1)
       {
              PrintToConsole(client, "
[SMUsagesm_report <message> <playerType !format for more information");
              PrintToConsole(client, "
[SMAbusing it will result in a ban!");
              PrintToChat(client, "
[SMAbusing it will result in a ban!");
              PrintToChat(client, "
[SMsm_report <message> <playerType !format for more information");
              return Plugin_Handled
      };
       if(args > 1)
      {
              PrintToChat(client, "
[SMSent!");
              PrintToConsole(client, "
[SMSent!");
              return Plugin_Handled
     };  
     {   
        new String:configFile[PLATFORM_MAX_PATH];
    BuildPath(Path_SM, configFile, sizeof(configFile), "
configs/reports.txt");
    new Handle:file = OpenFile(configFile, "
at+");
    
    FormatTime(datevar, 50, "
%d/%m/%Y");
    FormatTime(timevar, 50, "
%H:%M:%S");
                
    GetClientName(client, playername, 50);
    GetClientAuthString(client, steamid, 50);
    
    GetCmdArg(1, message, sizeof(message));
    
    WriteFileLine(file, "
-----------------------");
    WriteFileLine(file, "
Name : %(steamID : %sused sm_report the %s at %s", playername, steamid,  datevar, timevar);
    WriteFileLine(file, "
Message : %s", message);
    WriteFileLine(file, "
-----------------------");
    CloseHandle(file);
     };

__________________
Learning how to make plugins.

Last edited by matchaboy; 10-19-2013 at 07:56.
matchaboy is offline
TheKiwI
Member
Join Date: May 2011
Old 10-19-2013 , 07:49   Re: Error while compiling codes
Reply With Quote #2

Too many errors :

What for "IsEnabled" should be used ? never used in your code
why are you using "AddCommandListener(Command_Report, "sm_report");" ?

not
Code:
public Action:sm_report(client, const String:command[], args);
but
Code:
public Action:report_players(client, const String:command[], args);
__________________

Last edited by TheKiwI; 10-19-2013 at 08:12.
TheKiwI is offline
matchaboy
Senior Member
Join Date: Jun 2013
Location: Bananaland
Old 10-19-2013 , 07:56   Re: Error while compiling codes
Reply With Quote #3

Quote:
Originally Posted by TheKiwI View Post
Hi, we can't help without your code...
editted
__________________
Learning how to make plugins.
matchaboy is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 10-19-2013 , 08:05   Re: Error while compiling codes
Reply With Quote #4

Worst C&P job ever.
Pelipoika is offline
TheKiwI
Member
Join Date: May 2011
Old 10-19-2013 , 08:10   Re: Error while compiling codes
Reply With Quote #5

Quote:
Originally Posted by Pelipoika View Post
Worst C&P job ever.
I had this feeling too...
__________________
TheKiwI is offline
matchaboy
Senior Member
Join Date: Jun 2013
Location: Bananaland
Old 10-19-2013 , 08:14   Re: Error while compiling codes
Reply With Quote #6

well, it was my first plugin ._. so can anyone help?
__________________
Learning how to make plugins.

Last edited by matchaboy; 10-19-2013 at 08:14.
matchaboy is offline
TheKiwI
Member
Join Date: May 2011
Old 10-19-2013 , 08:19   Re: Error while compiling codes
Reply With Quote #7

Quote:
Originally Posted by matchaboy View Post
well, it was my first plugin ._. so can anyone help?
It's important to understand fonctions before using them. There are functions in your code that are not even used!
__________________
TheKiwI is offline
matchaboy
Senior Member
Join Date: Jun 2013
Location: Bananaland
Old 10-19-2013 , 08:28   Re: Error while compiling codes
Reply With Quote #8

like which?
__________________
Learning how to make plugins.
matchaboy is offline
TheKiwI
Member
Join Date: May 2011
Old 10-19-2013 , 08:31   Re: Error while compiling codes
Reply With Quote #9

Quote:
Originally Posted by matchaboy View Post
like which?
Please just look at my first post... I can't do it for you if you don't even read it
__________________
TheKiwI is offline
matchaboy
Senior Member
Join Date: Jun 2013
Location: Bananaland
Old 10-19-2013 , 08:33   Re: Error while compiling codes
Reply With Quote #10

Quote:
Originally Posted by TheKiwI View Post
Please just look at my first post... I can't do it for you if you don't even read it
oh didnt see the editted version of your first post, my bad
__________________
Learning how to make plugins.
matchaboy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode