AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What is wrong with this script? (https://forums.alliedmods.net/showthread.php?t=99646)

Bloodix 08-08-2009 01:42

What is wrong with this script?
 
I am fairly new to Pawn, so I'm still in the learning process. Whenever I run the script on my TFC server and use the command "ammx plugins" to make sure it was included correctly i tend to get "[ 20] unknown unknown unknown stats.amxx bad load" and "( 20) Load fails: Invalid Plugin (plugin "stats.amxx")" a lot. It compiles fine without any errors. It is not only this script, but simple ones. And even that tutorial on making pawn amxx plugin (though I did get it to work).

So what is wrong with the following? (btw its kinda not done since im in the middle of it, but can't really continue if I do not know what I am doing wrong. lol)

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <sqlx>
#include <fun>

new PLUGIN[] = "ZeNfA.net Player Stats"
new AUTHOR[] = "Bloodix"
new VERSION[] = "0.01"

new Host[32]
new 
User[32]
new 
Pass[32]
new 
DB[32]
new 
Error[128]
new 
ErrCode

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
get_cvar_string("amx_sql_host"Host32)
    
get_cvar_string("amx_sql_user"User32)
    
get_cvar_string("amx_sql_pass"Pass32)
    
get_cvar_string("amx_sql_db"DB32)
    
    
register_clcmd("say /count""zna_get_count")
}

public 
zna_get_count(idlevelcid)
{
    
console_print(id"test")
    
    return 
PLUGIN_CONTINUE


Thank you

Alucard^ 08-08-2009 02:24

Re: What is wrong with this script?
 
Post your modules.ini list.

One 08-08-2009 05:30

Re: What is wrong with this script?
 
lol?

PHP Code:

   register_clcmd("say /count""zna_get_count"


public 
zna_get_count(idlevelcid

    
console_print(id"test"
     
    return 
PLUGIN_CONTINUE 


i dont think that he needs for this part other modules as amxmodx :O

Arkshine 08-08-2009 05:52

Re: What is wrong with this script?
 
@Bloodix: How you compile your plugin ?

Alucard^ 08-08-2009 06:58

Re: What is wrong with this script?
 
Quote:

Originally Posted by One (Post 893249)
lol?

PHP Code:

   register_clcmd("say /count""zna_get_count"


public 
zna_get_count(idlevelcid

    
console_print(id"test"
     
    return 
PLUGIN_CONTINUE 


i dont think that he needs for this part other modules as amxmodx :O

Yes you are correct, sry i didnt see the code at all.

Bloodix 08-08-2009 11:33

Re: What is wrong with this script?
 
I am using the on-site compile tool. http://www.amxmodx.org/webcompiler.cgi

and here is my modules.ini

PHP Code:

;;;
To enable a moduleremove the semi-colon (;) in front of its name.
; If 
it's not here, simply add it its name, one per line.
; You don'
t need to write the _amxx part or the file extension.
;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
SQL Modules usually need to be enabled manually ;;
;; 
You can have any number on at a time.  Use      ;;
;;  
amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;
mysql
;sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
Put third party modules below here.              ;;
;; 
You can just list their nameswithout the _amxx ;;
;;  or 
file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
These modules will be auto-detected and loaded   ;;
;;  as 
needed.  You do not need to enable them here ;;
;;  
unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
;engine
;fakemeta
;geoip
;sockets
;regex
;nvault
tfcx 

Btw, if it helps I'm using version 1.76d. Should I upgrade to the latest version?

Edit: I have come to the conclusion that it is my version of amxx mod, since i tried installing the lastest verison on my own computer and my plugin worked fine

Arkshine 08-08-2009 18:39

Re: What is wrong with this script?
 
Yes because you have tried to compile the plugin with the compiler for the latest Amxx version and to enable it on an older Amxx version. Always using the same version for the compiler and the Amxx on your server.


All times are GMT -4. The time now is 18:25.

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