Raised This Month: $ Target: $400
 0% 

Plugin does nothing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
neo-the-hacker
New Member
Join Date: Apr 2006
Old 04-05-2006 , 10:58   Plugin does nothing
Reply With Quote #1

Hi
I've just begun to skript with amx. I have a Problem with my first Plugin:
It does nothing. Amxx say that it ios loaded and it does not show any errors.
It writes nothing to the logfile or the console, but it should print something when it has been loaded(log_amx).
Code:
#include <amxmodx> #include <dbi> new Sql:dbc new Result:result public plugin_init() {     register_plugin("admincall","0.1","neo-networks")     register_concmd("calladmin", "camenu",-1,"Ruft einen Admin")     register_menucmd(register_menuid("\yCall Admin:"), 1023, "calladmin")     set_task(Float:10.0,"sql_init")     log_amx("[CA Menu] geladen") } public sql_init() {     new host[64], username[32], password[32], dbname[32], error[32]     host="***.***.***.***"     username="******"     password="*******"     dbname="******"     log_amx("[CA Menu] SQL Init")     dbc = dbi_connect(host,username,password,dbname,error,32)     if (dbc == SQL_FAILED)         log_amx("[AMXX] SQL Connection Failed")     else         dbi_query(dbc,"CREATE TABLE IF NOT EXISTS `calladmins` (`Nickname` text NOT NULL,`server` text NOT NULL,`admin` text NOT NULL,`grund` text NOT NULL,  `datum` text NOT NULL) TYPE=MyISAM;") } public calladmin(id,key) {    log_amx("[CA Menu] CallAdmin")     if (dbc == SQL_FAILED)    return PLUGIN_HANDLED     new arg[32]     if (read_argc() == 0) return PLUGIN_HANDLED    switch(key) {       case 0: {          arg="Cheater"       }       case 1: {          arg="Bot"       }       case 2: {          arg="Mapchange"       }       case 3: {          arg="Sonstiges"       }    }     new ServerName[80]           new name[80]     new zeit[21]     get_user_info(id, "name", name, 31)     get_cvar_string("server_name", ServerName, 20)     get_time("%d.%m.%Y - %H:%M:%S",zeit,21)     result = dbi_query(dbc,"INSERT INTO calladmins (nickname,server,grund,datum) VALUES ( '%s','%s','%s','%s' )",name,ServerName,arg,zeit)     if (result == RESULT_OK) dbi_free_result(result)     if (result == RESULT_FAILED) return PLUGIN_HANDLED     new dbitype[32]     dbi_type(dbitype,32)     console_print(id,"Ein Admin wurde verstaendigt")     return PLUGIN_HANDLED } public camenu(id) {    log_amx("[CA Menu] Ca Menu angezeigt")    console_print(id,"CAMenu")    new menu[256]         format(menu, 255, "\yCall Admins:^n^n\w1. Cheater auf dem Server^n2. Probleme mit Bots^n3. Mapchange PLZ^n4. Anderes Problem^n^n\w0. Exit")         show_menu(id, ((1<<0|1<<1|1<<2|1<<3|1<<9)), menu)         return PLUGIN_HANDLED }
Can you find the error?

THX



Neo
neo-the-hacker is offline
Send a message via ICQ to neo-the-hacker
 



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 16:33.


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