Raised This Month: $51 Target: $400
 12% 

Debug problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MaXs
Member
Join Date: Jan 2017
Old 01-16-2017 , 12:30   Debug problem
Reply With Quote #1

[AMXX] Run time error 10 (plugin "Save-ammo.amxx") (native "zp_set_user_zombie_class") - debug not enabled!

and


[ZP] Invalid zombie class id (-1)
L 01/16/2017 - 19:29:20: [AMXX] Run time error 10 (plugin "zp50_zp43_compat.amxx") (native "zp_class_zombie_set_next") - debug not enabled!

Last edited by MaXs; 01-16-2017 at 12:31.
MaXs is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-16-2017 , 12:35   Re: Debug problem
Reply With Quote #2

Save-ammo code ?
__________________
edon1337 is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-16-2017 , 13:36   Re: Debug problem
Reply With Quote #3

also enable debug for that plugin to see the actualy problem , in plugins.ini in the front of the plugin name, like that:

( without quotes )
"Save-ammo.amxx debug"

After that open the server and try to reproduce the error( it will show you another message ), copy-paste the output here + the actual source code.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
MaXs
Member
Join Date: Jan 2017
Old 01-16-2017 , 13:58   Re: Debug problem
Reply With Quote #4

oh ok
MaXs is offline
MaXs
Member
Join Date: Jan 2017
Old 01-16-2017 , 14:02   Re: Debug problem
Reply With Quote #5

Sma: http://www67.zippyshare.com/v/J6dK2Vr3/file.html


Code: 01/16/2017 - 21:01:55: Unhandled dynamic native error
L 01/16/2017 - 21:01:55: [AMXX] Displaying debug trace (plugin "Save-ammo.amxx", version "1.5")
L 01/16/2017 - 21:01:55: [AMXX] Run time error 10: native error (native "zp_set_user_zombie_class")
L 01/16/2017 - 21:01:55: [AMXX] [0] Save-ammo.sma::load_user_data (line 163)
MaXs is offline
MaXs
Member
Join Date: Jan 2017
Old 01-16-2017 , 14:10   Re: Debug problem
Reply With Quote #6

zp50_zp43_compat.amxx debug
01/16/2017 - 21:091: [ZP] Invalid zombie class id (-1)
L 01/16/2017 - 21:091: [AMXX] Displaying debug trace (plugin "zp50_zp43_compat.amxx", version "5.0.5")
L 01/16/2017 - 21:091: [AMXX] Run time error 10: native error (native "zp_class_zombie_set_next")
L 01/16/2017 - 21:091: [AMXX] [0] lqatff69.sma.p::native_set_user_zombie_class (line 495)
MaXs is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-16-2017 , 14:34   Re: Debug problem
Reply With Quote #7

1.Go post your problem in the plugin's thread.
2.Learn how to use the edit button.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2017 , 12:08   Re: Debug problem
Reply With Quote #8

PHP Code:
    switch(get_pcvar_num(cvar_data_save_type))
    {
        case 
1:
        {
            
get_user_ip(id,user_data,63)
            
format(vaultkey,63,"[ip]%s",user_data)
        }
        case 
2:
        {
            
get_user_authid(id,user_data,63)
            
format(vaultkey,63,"[aulthid]%s",user_data)
        }
        default:
        {
            
get_user_name(id,user_data,63)
            
format(vaultkey,63,"[name]%s",user_data)
        }
    } 
try this
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <zombieplague>

/*START - From colorchat.inc by Numb */
enum Color {
    
NORMAL 1,
    
GREEN,
    
TEAM_COLOR,
    
GREY,
    
RED,
    
BLUE,
}

new 
TeamName[][] = {
    
"",
    
"TERRORIST",
    
"CT",
    
"SPECTATOR"
}
/*END - From colorchat.inc by Numb */

new data_vault,
cvar_data_save_typecvar_show_hpcvar_give_ammo_publiccvar_ammo_limit
public plugin_init() {
    
register_plugin("[ZP] Save-ammo by GM""1.5""GM")
    
register_cvar("Save-ammo_version","1.4",FCVAR_SERVER FCVAR_SPONLY)
    
    
register_clcmd("say","hook_say")
    
register_clcmd("say_team","hook_say")
    
    
register_event("Damage","event_damage","b","2!0","3=0","4!0"
    
    
cvar_data_save_type register_cvar("Save-ammo_data_save_type","0")
    
    
cvar_show_hp register_cvar("Save-ammo_show_hp","3")
    
    
cvar_give_ammo_public register_cvar("Save-ammo_public","1")
    
    
cvar_ammo_limit register_cvar("Save-ammo_limit","0")
    
    
data_vault nvault_open("Save-ammo")
}

public 
hook_say(id)
{
    new 
args[129], arg_cmd[6],arg_name[32],arg_ap[10]
    
read_args(args,128)
    
remove_quotes(args)
    
parse(argsarg_cmd,5arg_name,31arg_ap,9)
    
    if(
equali(arg_cmd,"/give"))
    {
        new 
name[32],target_name[32],targetnum_ap str_to_num(arg_ap)
        
get_user_name(id,name,31)
        
target cmd_target(id,arg_name,0)
        
get_user_name(target,target_name,31)
        
        if(!
target)
        {
            
ColorChat(id,GREEN,"[ZP]^x01 nemo6e da se nameri igra4 s tova ima ^x04%s^x01 .",arg_name)
            return
        }
        
        if(
equali(name,arg_name))
        {
            
ColorChat(id,GREEN,"[ZP]^x01 vie nemo6e da dadete na ebe si.")
            return
        }
        
        if(
zp_get_user_ammo_packs(id) < num_ap)
        {
            
ColorChat(id,GREEN,"[ZP]^x01 vie nqmate ammota za da dadete.")
            return
        }
        
        if(
num_ap <= 0)
        {
            
ColorChat(id,GREEN,"[ZP]^x01 vie mo6e da davate samo polo6itelni ammota ot 1-10000.")
            return
        }
        
        
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) - num_ap)
        
zp_set_user_ammo_packs(targetzp_get_user_ammo_packs(target) + num_ap)
        
        
ColorChat(id,GREEN,"[ZP]^x01 vie dadohte  ^x04%s^x01 ammo packs na ^x04%s^x01.",arg_ap,target_name)
        
ColorChat(target,GREEN,"[ZP] %s^x01 vie polu4ihte ^x04%s^x01 ammo packs.",name,arg_ap)
        
        if(
get_pcvar_num(cvar_give_ammo_public)) ColorChat(0,GREEN,"[ZP] %s^x01 gave ^x04%s^x01 ammo packs to ^x04%s^x01.",name,arg_ap,target_name)
    }
    
    if(
equali(arg_cmd,"/ap")) ColorChat(id,GREEN,"[ZP]^x01 vie imate  ^x04%i^x01 ammo packs.",zp_get_user_ammo_packs(id))
}

public 
event_damage(id)
{
    new 
killer,hp
    killer 
get_user_attacker(id)
    
hp get_user_health(id)
    
    if(!
is_user_connected(killer) || !is_user_connected(id)) return
    
    if(
hp 0)
    {
        switch(
get_pcvar_num(cvar_show_hp))
        {
            case 
1: if(zp_get_user_zombie(id)) client_print(killer,print_center,"HP: %i",hp)
            case 
2: if(zp_get_user_nemesis(id)) client_print(killer,print_center,"HP: %i",hp)
            case 
3: if(zp_get_user_zombie(id) || zp_get_user_nemesis(id)) client_print(killer,print_center,"HP: %i",hp)
        }
    } else {
        switch(
get_pcvar_num(cvar_show_hp))
        {
            case 
1: if(zp_get_user_zombie(id)) client_print(killer,print_center,"KILLED!")
            case 
2: if(zp_get_user_nemesis(id)) client_print(killer,print_center,"KILLED!")
            case 
3: if(zp_get_user_zombie(id) || zp_get_user_nemesis(id)) client_print(killer,print_center,"KILLED!")
        }
    }
}

public 
client_putinserver(id)
{
    
set_task(1.0,"load_user_data",id)
}

public 
client_disconnect(id)
{
    
save_user_data(id)
}

public 
load_user_data(id)
{
    if(!
is_user_connected(id)) return
    
    new 
user_data[64], vaultkey[64],vaultdata[256], data_ammo_packs[32],data_zombie_class[32]
    
    switch(
get_pcvar_num(cvar_data_save_type))
    {
        case 
1:
        {
            
get_user_ip(id,user_data,63)
            
format(vaultkey,63,"[ip]%s",user_data)
        }
        case 
2:
        {
            
get_user_authid(id,user_data,63)
            
format(vaultkey,63,"[aulthid]%s",user_data)
        }
        default:
        {
            
get_user_name(id,user_data,63)
            
format(vaultkey,63,"[name]%s",user_data)
        }
    }
    
    
format(vaultdata,255,"%i#%s#",zp_get_user_ammo_packs(id),zp_get_user_zombie_class(id))
    
nvault_get(data_vault,vaultkey,vaultdata,255)
    
replace_all(vaultdata,255,"#"," ")
    
    
parse(vaultdatadata_ammo_packs,31data_zombie_class,31)
    
zp_set_user_ammo_packs(idstr_to_num(data_ammo_packs))
    
zp_set_user_zombie_class(idstr_to_num(data_zombie_class))
    
    if(
get_pcvar_num(cvar_ammo_limit) != && zp_get_user_ammo_packs(id) > get_pcvar_num(cvar_ammo_limit)) zp_set_user_ammo_packs(id,get_pcvar_num(cvar_ammo_limit))
}

public 
save_user_data(id)
{
    new 
user_data[64], vaultkey[64],vaultdata[256]
    
    switch(
get_pcvar_num(cvar_data_save_type))
    {
        case 
1:
        {
            
get_user_ip(id,user_data,63)
            
format(vaultkey,63,"[ip]%s",user_data)
        }
        case 
2:
        {
            
get_user_authid(id,user_data,63)
            
format(vaultkey,63,"[aulthid]%s",user_data)
        }
        default:
        {
            
get_user_name(id,user_data,63)
            
format(vaultkey,63,"[name]%s",user_data)
        }
    }
    
    
format(vaultdata,255,"%i#%i#",zp_get_user_ammo_packs(id),zp_get_user_zombie_class(id))
    
nvault_set(data_vault,vaultkey,vaultdata)
}

/*START - From colorchat.inc by Numb */
ColorChat(idColor:type, const msg[], {FloatSqlResult,_}:...) {
    new 
message[256]

    switch(
type) {
        case 
NORMALmessage[0] = 0x01
        
case GREENmessage[0] = 0x04
        
default: message[0] = 0x03
    
}

    
vformat(message[1], 251msg4)

    
message[192] = '^0'

    
new teamColorChangeindexMSG_Type

    
if(id) {
        
MSG_Type MSG_ONE
        index 
id
    
} else {
        
index FindPlayer()
        
MSG_Type MSG_ALL
    
}

    
team get_user_team(index)
    
ColorChange ColorSelection(indexMSG_Typetype)

    
ShowColorMessage(indexMSG_Typemessage)

    if(
ColorChange)
        
Team_Info(indexMSG_TypeTeamName[team])
}

ShowColorMessage(idtypemessage[]) {
    static 
bool:saytext_used
    
static get_user_msgid_saytext

    
if(!saytext_used) {
        
get_user_msgid_saytext get_user_msgid("SayText")
        
saytext_used true
    
}

    
message_begin(typeget_user_msgid_saytext_id)
    
write_byte(id)
    
write_string(message)
    
message_end()
}

Team_Info(idtypeteam[]) {
    static 
bool:teaminfo_used
    
static get_user_msgid_teaminfo

    
if(!teaminfo_used) {
        
get_user_msgid_teaminfo get_user_msgid("TeamInfo")
        
teaminfo_used true
    
}

    
message_begin(typeget_user_msgid_teaminfo_id)
    
write_byte(id)
    
write_string(team)
    
message_end()

    return 
1
}

ColorSelection(indextypeColor:Type) {
    switch(
Type) {
        case 
RED: return Team_Info(indextypeTeamName[1])
        case 
BLUE: return Team_Info(indextypeTeamName[2])
        case 
GREY: return Team_Info(indextypeTeamName[0])
    }

    return 
0
}

FindPlayer() {
    new 
= -1

    
while(<= get_maxplayers()) {
        if(
is_user_connected(++i))
            return 
i
    
}

    return -
1

__________________
edon1337 is offline
MaXs
Member
Join Date: Jan 2017
Old 01-17-2017 , 12:36   Re: Debug problem
Reply With Quote #9

thanks but : [AMXX] Displaying debug trace (plugin "now.amxx", version "1.5")
L 01/17/2017 - 192:42: [AMXX] Run time error 10: native error (native "zp_set_user_zombie_class")
L 01/17/2017 - 192:42: [AMXX] [0] c4ec62os.sma.p::load_user_data (line 163)
still.
MaXs is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-17-2017 , 16:27   Re: Debug problem
Reply With Quote #10

The problem is with your zombie mod not with the plugin extended.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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 00:17.


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