Raised This Month: $ Target: $400
 0% 

my first plugin... need some help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 01-26-2005 , 22:08   my first plugin... need some help
Reply With Quote #1

im trying to do a tutorial plugin that i found on a site...
keep in mind, this is my first one ever...
can someone help me?

Code:
#include <amxmodx> #include <amxmisc> #define ADMIN_TEXT ADMIN_USER public plugin_int() {     register_plugin ("Text Messaging!","1.1","UnKn0wNkIlLeR")     register_concmd("amx_test","amx_test", ADMIN_TEXT, "amx_text")     register_cvar("sv_text","1") } public amx_text(id) {     new string[200], string[3]     read_argv(1,string,2);     read_argv(2,string,199);     if(!get_cvar_num("sv_text"))     return PLUGIN_HANDLED;         switch(str_to_num(string))     {         case 0: client_print(0,print_chat,"[AMX] %s", string2)         case 1: client_print(0,print_center,"[AMX] %s", string2)         case 2: client_print(0,print_console,"[AMX] %s", string2)         case 3: client_print(0,print_notify,"[AMX] %s", string2)     }       return PLUGIN_HANDLED; }

and heres the errors:

/home/users/amxmodx/tmp/okct1j20.sma(15) : error 021: symbol already defined: "string"
/home/users/amxmodx/tmp/okct1j20.sma(22) : error 017: undefined symbol "string2"
/home/users/amxmodx/tmp/okct1j20.sma(22 -- 23) : warning 202: number of arguments does not match definition
/home/users/amxmodx/tmp/okct1j20.sma(22 -- 23) : error 001: expected token: ",", but found "case"
/home/users/amxmodx/tmp/okct1j20.sma(23) : error 017: undefined symbol "string2"
/home/users/amxmodx/tmp/okct1j20.sma(23) : fatal error 107: too many error messages on one line
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
 



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 19:18.


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