this is what devs should look into
ROFLZMAO this is really something.
ok i figured it out. pff.
so the amxx 1.76a (and previous versions - tho i might be wrong here) doesn't come with a .sma file for admin_sql. the only admin_sql file i got is admin_sql.amxx as in the already compiled plugin.
now, in the plugins.ini file you are instructed to comment the admin.amxx file and leave the admin_sql.amxx file only (if you want sql support, ofcourse). also in the modules.ini you must uncomment ";mysql".
that's exactly what i did.
then i populated the database and it got like 99 records, that's 99 admins
then i got the nasty out of bounds error and debugged almost a day to find out the problem. i must mention that i was only modifying the admin.sma file and recompiling. - because i have no admin_sql.sma to edit -
- because the admin_sql.amxx is compiled with MAX_ADMINS 64(i think this is right) the problem appears everytime and since the admin.amxx line in plugins.ini is commented, it didn't matter how many times i had to edit, recompile, restart the server, etc.
- now i don't know how admin.amxx and admin_sql.amxx interact but i suppose that whatever is declared in admin.amxx has priority, because once i uncommented the admin.amxx in the plugins.ini and left both admin.amxx and admin_sql.amxx running, it worked like a charm. with the exception that the output was doubled.
like this:
Code:
] restart
L 10/04/2006 - 19:47:13: -------- Mapchange to de_dust2 --------
Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
[AMXX] Loaded 99 admins from database
Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
[AMXX] Loaded 99 admins from database
at first the plugin appears to be loaded twice:
Code:
] amxx plugins
Currently loaded plugins:
name version author file status
[ 1] Admin Base (SQL) 1.76 AMXX Dev Team admin.amxx running
[ 2] Admin Base (SQL) 1.76 AMXX Dev Team admin_sql.amxx running
because certain things that i took for granted no longer applied, i thought `let's comment admin_sql.amxx back in the plugins.ini and see what happens`. and what happened is that it worked. (probably works in sql mode in a default install as long as you don't have mysql commented in the modules.ini)
so the final result is that i have a server running with admin_sql.amxx comented in plugins.ini and mysql uncommented in modules ini, also admin.amxx uncommented in the plugins.ini and finally admins loading from the mysql database.