BANNED
Join Date: Sep 2012
Location: Noob Member
|
12-19-2012
, 00:11
[ZP] Debug en Cur_Weapon & SQlite
|
#1
|
Code:
L 12/18/2012 - 22:48:13: [AMXX] Displaying debug trace (plugin "zombie_plague40.amxx")
L 12/18/2012 - 22:48:13: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 12/18/2012 - 22:48:13: [AMXX] [0] zombie_plague40.sma::fm_cs_get_current_weapon_ent (line 17934)
L 12/18/2012 - 22:48:13: [AMXX] [1] zombie_plague40.sma::message_cur_weapon (line 8543)
L 12/18/2012 - 23:00:44: Start of error session.
L 12/18/2012 - 23:00:44: Info (map "zm_dark2[ZP_GALAXY]") (file "addons/amxmodx/logs/error_20121218.log")
L 12/18/2012 - 23:00:44: [SQLITE] No result set in this query!
L 12/18/2012 - 23:00:44: [AMXX] Displaying debug trace (plugin "zombie_plague40.amxx")
L 12/18/2012 - 23:00:44: [AMXX] Run time error 10: native error (native "SQL_FieldNameToNum")
L 12/18/2012 - 23:00:44: [AMXX] [0] zombie_plague40.sma::QuerySelectData (line 2277)
Codigo & Lineas:
PHP Code:
// Current Weapon info public message_cur_weapon(msg_id, msg_dest, msg_entity) { // Not alive or zombie if (!g_isalive[msg_entity] || g_zombie[msg_entity]) return; // Not an active weapon if (get_msg_arg_int(1) != 1) return; // Unlimited clip disabled for class if (g_has_unlimited_clip[msg_entity]) return; // Get weapon's id static weapon weapon = get_msg_arg_int(2) // Unlimited Clip Ammo for this weapon? if (MAXBPAMMO[weapon] > 2) { // Max out clip ammo cs_set_weapon_ammo(fm_cs_get_current_weapon_ent(msg_entity), MAXCLIP[weapon]) // Error Linea 8543 // HUD should show full clip all the time set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) } }
PHP Code:
// Get User Current Weapon Entity stock fm_cs_get_current_weapon_ent(id) { // Prevent server crash if entity's private data not initalized if (pev_valid(id) != PDATA_SAFE) return -1; return get_pdata_cbase(id, OFFSET_ACTIVE_ITEM, OFFSET_LINUX); // Error Linea 17934 }
PHP Code:
public QuerySelectData(iFailState, Handle:hQuery, szError[ ], iError, iData[ ], iDataSize, Float:fQueueTime ) { static id; id = iData[ 0 ]; if( !is_user_connected(id)) return PLUGIN_HANDLED switch( iFailState ) { case TQUERY_CONNECT_FAILED: { log_to_file( "SQL_LOG_TQ.txt", "Error en la conexion al MySQL QuerySelectData [%i]: %s", iError, szError ); return PLUGIN_CONTINUE; } // Error Linea 2277 case TQUERY_QUERY_FAILED: log_to_file( "SQL_LOG_TQ.txt", "Error en la consulta al MySQL QuerySelectData [%i]: %s", iError, szError ); } static Col_pun_mej_h, i static Col_colores
Col_pun_mej_h = SQL_FieldNameToNum(hQuery, "Mejoras") Col_colores = SQL_FieldNameToNum(hQuery, "Colores") while(SQL_MoreResults(hQuery)){
SQL_ReadResult(hQuery, Col_pun_mej_h, str_pun_mej_h, 30) SQL_ReadResult(hQuery, Col_colores, str_colores, 150) SQL_NextRow(hQuery) } static mejoras_hSQL[4][4] static colores_SQL[15][4]
parse(str_pun_mej_h, mejoras_hSQL[0], 3, mejoras_hSQL[1], 3, mejoras_hSQL[2], 3, mejoras_hSQL[3], 3) parse(str_colores, colores_SQL[0], 3, colores_SQL[1], 3, colores_SQL[2], 3, colores_SQL[3], 3, colores_SQL[4], 3, colores_SQL[5], 3, colores_SQL[6], 3, colores_SQL[7], 3, colores_SQL[8], 3, colores_SQL[9], 3, colores_SQL[10], 3, colores_SQL[11], 3, colores_SQL[12], 3, colores_SQL[13], 3, colores_SQL[14], 3)
for(i = 0; i < 4; i++) g_mejoras[id][i] = str_to_num(mejoras_hSQL[i]) for(i = 0; i < 15; i++) Colores[id][i] = str_to_num(colores_SQL[i])
SQL_FreeHandle(hQuery) return PLUGIN_CONTINUE; }
Last edited by GalaxyA; 12-19-2012 at 11:27.
|
|