Raised This Month: $ Target: $400
 0% 

amx_score Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
_Rustynails_
Junior Member
Join Date: Aug 2004
Old 08-29-2004 , 19:33   amx_score Help
Reply With Quote #1

I'm making a new plugin called 'amx_score'
Usage: amx_score <user> <kills> <deaths>

I tried compiling this plugin on the AMX Mod X website at www.amxmodx.org/compiler.php?go=sc
I get these errors:

/home/users/amxmodx/tmp/phplM6fME.sma(1 : error 033: array must be indexed (variable "deaths")
/home/users/amxmodx/tmp/phplM6fME.sma(19) : error 035: argument type mismatch (argument 1)
/home/users/amxmodx/tmp/phplM6fME.sma(20) : error 035: argument type mismatch (argument 1)
/home/users/amxmodx/tmp/phplM6fME.sma(22) : error 035: argument type mismatch (argument 2)
/home/users/amxmodx/tmp/phplM6fME.sma(23) : error 035: argument type mismatch (argument 2)


Here is my code.
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> public plugin_init() {   register_plugin("AMX-Score","0.1","Rustynails")   register_clcmd("amx_score","do_score",ADMIN_BAN) } public do_score(id) {   new user[32], kills[4], deaths[4], uid   read_argv(1,user,31)   read_argv(2,kills,3)   read_argv(3,deaths,3)   uid = find_player("bhl",user)   if (access(id,ADMIN_BAN)) {     if (deaths) {       if (isdigit(kills)) {         if (isdigit(deaths)) {           if (uid) {             set_user_frags(uid,kills)             cs_set_user_deaths(uid,deaths)             console_print(id,"Changed score.")             } else {             console_print(id,"No such user has been identified on this server.")           }           } else {           console_print(id,"The amount of deaths may only be in numbers.")         }         } else {         console_print(id,"The amount of kills may only be in numbers.")       }       } else {       console_print(id,"You did not supply enough information.")     }     } else {     console_print(id,"You do not have enough access to use this command.")   }   return PLUGIN_HANDLED }

Thanks for your help.
_Rustynails_ is offline
 



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 17:24.


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