Raised This Month: $ Target: $400
 0% 

Handlers not called or called wrong :/


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 08-05-2011 , 17:59   Re: Handlers not called or called wrong :/
Reply With Quote #1

I dont know way but I desactived autologin code, then I complied and works perfect. When I activate autologin code again it works perfect o.O

Sorry for my later answer...

I have other problem...
I dont know whats wrong here :/

Code:
L 07/29/2011 - 14:17:44: Start of error session.
L 07/29/2011 - 14:17:44: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20110729.log")
L 07/29/2011 - 14:17:44: [MySQL] Invalid info tuple handle: 1
L 07/29/2011 - 14:17:44: [AMXX] Displaying debug trace (plugin "zp-infernus.amxx")
L 07/29/2011 - 14:17:44: [AMXX] Run time error 10: native error (native "SQL_Connect")
L 07/29/2011 - 14:17:44: [AMXX]    [0] zp-infernus.sma::Save (line 3224)
L 07/29/2011 - 14:17:44: [AMXX]    [1] zp-infernus.sma::FwServerShutdown (line 4236)
PHP Code:
register_forward(FM_Sys_Error"FwServerShutdown")
    
register_forward(FM_GameShutdown"FwServerShutdown")
    
register_forward(FM_ServerDeactivate "FwServerShutdown"
PHP Code:
public FwServerShutdown()
{
    for (new 
id 1id <= g_maxplayersid++) 
    {
        
Save(id10)
    }

PHP Code:
public Save(idtype)
{
    if(!
LogeadoUSR[id] || LogeadoUSR[id] == 1) return PLUGIN_HANDLED

    g_hTuple 
SQL_Connect(g_Sqlnumerrorcharsmax(error))
    
    if(
type || type == 10)
    {
        
g_query SQL_PrepareQuery(g_hTuple"UPDATE `pjs_zp` SET `ClaseHumana`='%d', `ClaseZombie`='%d', `Level`='%d', `Ammopacks`='%d', `Resets`='%d', `Puntos`='%d' WHERE ( `Nombre`='%s' )"
        
g_humanclassnext[id], 
        
g_zombieclassnext[id], 
        
g_level[id], 
        
g_ammopacks[id], 
        
g_reset[id], 
        
g_points[id], 
        
g_pj_actual[id])
        
SQL_Execute(g_query)
    }
    
    if(
type == || type == 10)
    {
        
g_query SQL_PrepareQuery(g_hTuple"UPDATE `pjs_zp` SET `hVida`='%d', `hVelocidad`='%d', `hGravedad`='%d', `hDamage`='%d', `hArmor`='%d' WHERE ( `Nombre`='%s' )",
        
g_hab[id][HAB_HUMAN][HUMAN_HP],
        
g_hab[id][HAB_HUMAN][HUMAN_SPEED],
        
g_hab[id][HAB_HUMAN][HUMAN_GRAVITY],
        
g_hab[id][HAB_HUMAN][HUMAN_DAMAGE],
        
g_hab[id][HAB_HUMAN][HUMAN_ARMOR],
        
g_pj_actual[id])
        
SQL_Execute(g_query)
    }
    
    if(
type == || type == 10)
    {
        
g_query SQL_PrepareQuery(g_hTuple"UPDATE `pjs_zp` SET `zVida`='%d', `zVelocidad`='%d', `zGravedad`='%d' WHERE ( `Nombre`='%s' )"
        
g_hab[id][HAB_ZOMBIE][ZOMBIE_HP],
        
g_hab[id][HAB_ZOMBIE][ZOMBIE_SPEED],
        
g_hab[id][HAB_ZOMBIE][ZOMBIE_GRAVITY],
        
g_pj_actual[id])
        
SQL_Execute(g_query)
    }
    
    if(
type == || type == 10)
    {
        
g_query SQL_PrepareQuery(g_hTuple"UPDATE `pjs_zp` SET `HUD_STATS_X`='%f', `HUD_STATS_Y`='%f', `HUD_TITILEO`='%d', \
        `HUD_RED`='%d', `HUD_GREEN`='%d', `HUD_BLUE`='%d' WHERE ( `Nombre`='%s' )"

        
HUD_STATS_X[id],
        
HUD_STATS_Y[id], 
        
HUD_TITILEO[id],
        
HUD_RED[id],
        
HUD_GREEN[id],
        
HUD_BLUE[id],
        
g_pj_actual[id])
        
SQL_Execute(g_query)
    }
    
    if(
type == || type == 10)
    {
        
g_query SQL_PrepareQuery(g_hTuple"UPDATE `pjs_zp` SET `Quest_Zombies`='%d', `Quest_Humanos`='%d', `Quest_Infectados`='%d', `Quest_Level`='%d' WHERE ( `Nombre`='%s' )",
        
g_obj[id][0], g_obj[id][1], g_obj[id][2], g_level_m[id], g_pj_actual[id])
        
SQL_Execute(g_query)
    }
    
    return 
PLUGIN_HANDLED

__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Reply



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 03:19.


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