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