Raised This Month: $ Target: $400
 0% 

Name Checker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 03-05-2006 , 18:33   Name Checker
Reply With Quote #1

Okay, I just scripted this plugin and it will not complie without errors, here is the code and errors. Please help.
Code:
//------------------------ //  Amx Mod X Script //------------------------ // //    Name Checker //       -- Checks a clients name if they were added to the file, changes there name to the one in the file. // //------------------------ // //    Names Stored In: //       --/addons/amxmodx/configs/name_checker.ini // //       This file is created automatically when the plugin is run for the first time. //       The names are loaded on map change. // //------------------------ // //    Cvars: // //       nc_enable < 0=off | 1=on > //              --Enables/Disables map objective showing // // //------------------------ // //    Commands: // //       nc_add <steamid> <name> //              --Adds client to the name checker list. // //       nc_del <steamid> //              --Deletes client from the name checker list. // //------------------------ // //    Changelog: // //        v1.0 - Initial Build // //------------------------ #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Name Checker","v1.0","Fire")     register_cvar("nc_enable","1")     register_concmd("nc_add","nc_add",ADMIN_IMMUNITY,"Adds a Name To Be Checked -- nc_add <steamid> <name>")     register_concmd("nc_del","nc_del",ADMIN_IMMUNITY,"Deletes a Name That Is Being Checked -- nc_del <steamid>") } public nc_add(id, level, cid) {     if(get_cvar_num("nc_enable") == 0)         return PLUGIN_HANDLED             if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED     new Arg1[32]     new Arg2[32]         read_argv(1, Arg1, 31)     read_argv(2, Arg2, 31)             new szConfigsdir[200]     get_configsdir(szConfigsdir, 199)         new szConfigfile[200]     format(szConfigfile, 199, "%s/name_checker.ini", szConfigsdir)         new iLine, szLinestr[256], iLen     while(read_file(szConfigfile, iLine++, szLinestr, 255, iLen)) {         if(szLinestr[0] == ';' || iLen <= 1 || equal(Arg1, szLinestr)) {         console_print(id,"%s's name is all ready being checked!", Arg2)             } else {         write_file("szConfigfile", "^"%s^" ^"%s^"", -1, Arg1, Arg2)             }         }     return PLUGIN_HANDLED } public nc_del(id, level, cid) {     if(get_cvar_num("nc_enable") == 0)         return PLUGIN_HANDLED             if (!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED     new Arg1[32]     read_argv(1, Arg1, 31)     new szConfigsdir[200]     get_configsdir(szConfigsdir, 199)         new szConfigfile[200]     format(szConfigfile, 199, "%s/name_checker.ini", szConfigsdir)         new iLine, szLinestr[256], iLen     while(read_file(szConfigfile, iLine++, szLinestr, 255, iLen)) {         if(szLinestr[0] == ';' || iLen <= 1 || equal(Arg1, szLinestr)) {         write_file("szConfigfile", "", iLine)         }     }     return PLUGIN_HANDLED } public client_authorized(id) {     if(get_cvar_num("nc_enable") == 0)         return PLUGIN_HANDLED             new szConfigsdir[200]     get_configsdir(szConfigsdir, 199)         new szConfigfile[200]     add(szConfigsdir, 199, "/name_checker.ini")     if(!file_exists(szConfigsdir)) {         write_file(szConfigfile, "; Name Checker -- By: Fire")         write_file(szConfigfile, "; -- Do Not Edit This --")     }         format(szConfigfile, 199, "%s/name_checker.ini", szConfigsdir)         new szSteamid[35]     get_user_authid(id, szSteamid, 34)         new iLine, szLinestr[256], iLen         new szName[35], szStoredSteamid[35]         while(read_file(szConfigfile, iLine++, szLinestr, 255, iLen)) {         if(szLinestr[0] == ';' || !iLen) continue         parse(szLinestr, szStoredSteamid, 34, szName, 34)         if(equal(szSteamid, szStoredSteamid)) {             client_cmd("name %s", szName)         }     }     return PLUGIN_HANDLED }
Code:
/home/users/amxmodx/tmp3/phpXzBHPF.sma(78) : error 088: number of arguments does not match definition
/home/users/amxmodx/tmp3/phpXzBHPF.sma(143) : error 035: argument type mismatch (argument 1)
Please Help +karma
Attached Files
File Type: sma Get Plugin or Get Source (name_checker.sma - 110 views - 3.5 KB)
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
 



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 20:21.


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