AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   AMX Mod X 0.20-3 Talk (https://forums.alliedmods.net/showthread.php?t=5192)

Neo-Vortex 08-24-2004 09:38

hmmm, now i notice this thread... *hits head on wall and walks off*

karlos 08-24-2004 10:32

still have this request: in util.cpp the func UTIL_ShowMOTD is
Code:
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name) {     if (!gmsgServerName)         return;             // :TODO: Maybe output a warning log?     MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );     WRITE_STRING(name);     MESSAGE_END();     char *n = motd;     char c = 0;     int a;     while ( *n ) {         a = mlen;         if ( a > 175 ) a = 175;         mlen -= a;         c = *(n+=a);         *n = 0;         MESSAGE_BEGIN( MSG_ONE , gmsgMOTD, NULL, client );         WRITE_BYTE( c ? FALSE : TRUE );         WRITE_STRING( motd );         MESSAGE_END();         *n = c;         motd = n;     }     MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );     WRITE_STRING( hostname->string );     MESSAGE_END(); }
my request is to change it to something like that
Code:
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name) {     if (gmsgServerName){         MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );         WRITE_STRING(name);         MESSAGE_END();     }     char *n = motd;     char c = 0;     int a;     while ( *n ) {         a = mlen;         if ( a > 175 ) a = 175;         mlen -= a;         c = *(n+=a);         *n = 0;         MESSAGE_BEGIN( MSG_ONE , gmsgMOTD, NULL, client );         WRITE_BYTE( c ? FALSE : TRUE );         WRITE_STRING( motd );         MESSAGE_END();         *n = c;         motd = n;     }     if (gmsgServerName){         MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );         WRITE_STRING( hostname->string );         MESSAGE_END();     } }
this way gmsgServerName is still checked (i had errors with it myself, my old version of OpFor cant display it) AND a MOTD is SHOWN (that is very important to me). Otherwise i would have to recompile it myself again, what i would like to prevent as i have some probs with it

karlos 08-24-2004 12:17

trim func dosnt work correctly (it trims chars too)
in my fun i made this:
Code:
new test[14], test2[14], test3[14]     format(test,13," abcde  ")     format(test2,13,"^t^t^tabc  ")     format(test3,13,"^t ^t abc^t ")     trim(test)     trim(test2)     trim(test3)     log_amx(test)     log_amx(test2)     log_amx(test3)
output is:
Code:
L 08/24/2004 - 17:17:59: [test.amxx] abcde L 08/24/2004 - 17:17:59: [test.amxx]    ac L 08/24/2004 - 17:17:59: [test.amxx]   b
it seems that this problem occurs when there are tabs (^t) in text

knocker 08-24-2004 12:45

Quote:

Originally Posted by aceracer
L 08/24/2004 - 19:57:12: [AMXX] Run time error 10 on line 180 (task "92890818") (plugin "multilingual.amxx")
L 08/24/2004 - 19:57:17: [AMXX] Run time error 10 on line 100 (task "92890818") (plugin "adminhelp.amxx")

i get these too ... :?

Kamikaze 08-24-2004 13:03

I'm getting this error from engine.inc when compiling Warcraft 3 Frozen Throne:

// amxx\scripting\include\engine.inc(287) : error 032: array index out of bounds (variable "fCheckAt")

Here's the lines in engine.inc:

/* Will return the contents of a point (inside map? in sky? outside map? etc.). */
stock PointContents(Float:fCheckAt[3]) {
return point_contents(fCheckAt[3]);
}

Line 287 points to return point_contents(fCheckAt[3]);


Also getting tag mismatch warning with mysql.inc file:

// amxx\scripting\include\mysql.inc(22) : warning 213: tag mismatch
// amxx\scripting\include\mysql.inc(36) : warning 213: tag mismatch
// amxx\scripting\include\mysql.inc(42) : warning 213: tag mismatch


/* Opens connection. If already such exists then that will be used.
* Function returns sql id to use with other sql natives.
* Host can be plain ip or with port seperated with ':' char. */
stock mysql_connect(host[],user[],pass[],dbname[],error[],maxlength)
{
return dbi_connect(host, user, pass, dbname, error, maxlength)
} <---- this being line 22



/* Clears query (sql) and closes connection (if any other plugin doesn't use it). */
stock mysql_close(sql)
{
return dbi_close(sql) <----------- this being line 36
}




/* Stores last error of current query/connection (sql) in (dest) with (maxlength) characters maximum. */
stock mysql_error(sql,dest[],maxlength)
{
return dbi_error(sql, dest, maxlength) <-------- this being line 42
}

Kamikaze 08-24-2004 13:23

CVS version fixed the engine.inc bug, the mysql bug is still there.

Anyone having trouble with that engine.inc bug should go on the CVS and download the engine.inc on there.

devicenull 08-24-2004 13:30

Kamikaze: Mysql, create your sql connection variable like this
Code:
new Sql:sql
Where the second sql is the variable name, just like floats and stuff

Also, this would be nice to put in amxmisc or dbi
Code:
stock init_sql(Sql:db) {     new host[64], username[32], password[32], dbname[32], error[32]     get_cvar_string("amx_sql_host",host,64)     get_cvar_string("amx_sql_user",username,32)     get_cvar_string("amx_sql_pass",password,32)     get_cvar_string("amx_sql_db",dbname,32)     db = dbi_connect(host,username,password,dbname,error,31)     if (db == SQL_FAILED) {         return -1     } return 1 }

Kamikaze 08-24-2004 13:55

Mysql module is not loading at all for me, I get this error:

L 08/24/2004 - 12:44:03: [AMXX] Module is not a valid library (file "cstrike\addons\amxx\modules\mysql_amxx.d ll")
08/24/2004 - 12:44:03: [AMXX] Function not found (name "dbi_result") (plugin "admin_sql.amxx")

Anyone else getting this:

Server used:
Windows Server 2003
AMXX 0.20 T3
Metamod 1.17.2

Why isn't the source file there for admin_sql.sma?

All I see is admin.sma and in that file you can comment out for sql version but do I use admin.amxx or admin_sql.amxx? I'm confused about that, doesn't matter with the Mysql not loading but just wondering.

Kamikaze 08-24-2004 13:57

I get this runtime error that will make the server lock up:

L 08/24/2004 - 12:47:06: [AMXX] Run time error 10 on line 197 (plugin "grenades_are_heavy.amxx"):

Points to these lines:

public ImpactDamage(id,grenadeid) {
new Float:gorigin[3], origin[3]
entity_get_vector(grenadeid, EV_VEC_origin, gorigin)
origin[0]=floatround(gorigin[0])
origin[1]=floatround(gorigin[1])
origin[2]=floatround(gorigin[2])
if ( !is_user_alive(id) ) return
message_begin(MSG_ONE, get_user_msgid("Damage"), {0,0,0}, id)
write_byte(30) // dmg_save
write_byte(30) // dmg_take
write_long(0) // visibleDamageBits
write_coord(origin[0]) // damageOrigin.x
write_coord(origin[1]) // damageOrigin.y
write_coord(origin[2]) // damageOrigin.z
message_end() <------ this is line 197
}

Anyone have any ideas?

Sorry if this might not be relievent, just trying to post as many bugs as I can to help fix them for the final release.

Kamikaze 08-24-2004 14:06

Typing amx_modules in the server console will crash the server (using Windows).


All times are GMT -4. The time now is 06:41.

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