L 01/10/2011 - 23:56:28: [AMXX] Displaying debug trace (plugin "cfjail_pl.amxx") L 01/10/2011 - 23:56:28: [AMXX] Run time error 3: stack error L 01/10/2011 - 23:56:28: [AMXX] [0] cfjail_pl.sma::SaveData (line 725) L 01/10/2011 - 23:56:28: [AMXX] [1] cfjail_pl.sma::Event_Deathmsg (line 464)
A oto te linie w kodzie (funkcje):
public Event_Deathmsg()
{
new attacker = read_data(1)
new victim = read_data(2)
new headshot = read_data(3)
new AttackerName[32]
new VictimName[32]
get_user_name(attacker, AttackerName, 31)
get_user_name(victim, VictimName,31)
if(!IsPlayer(attacker))
return PLUGIN_HANDLED
if(!IsPlayer(victim))
return PLUGIN_HANDLED
if( cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_T)
{
if(get_pcvar_num(cvar_showrebels) && !lr_started)
{
if(!is_rebel[victim])
{
#if defined USE_CC
ColorChat(0, RED, "%s Guard^x03 %s^x04 killed prisoner^x03 %s!", PREFIX, AttackerName, VictimName)
#else
client_print(0, print_chat, "%s Guard %s killed prisoner %s!", PREFIX, AttackerName, VictimName)
#endif
}
else
{
#if defined USE_CC
ColorChat(0, RED, "%s Guard^x03 %s^x04 killed rebel^x03 %s!", PREFIX, AttackerName, VictimName)
#else
client_print(0, print_chat, "%s Guard %s killed rebel %s", PREFIX, AttackerName, VictimName)
#endif
unrebel(victim)
}
}
}
if( cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
{
playerpoints[attacker] += get_pcvar_num(cvar_killpoints)
if(headshot)
playerpoints[attacker] += get_pcvar_num(cvar_headshotpoints);
if(lr_started)
{
if(is_lr_s4s)
is_lr_s4s = false
if(lrgame[attacker] != LR_REBEL)
strip_weapons(attacker)
lr_started = false
lrgame[attacker] = LR_NONE
}
}
if(spray_on)
{
server_cmd("decalfrequency 20")
spray_on = false
}
if(task_exists(attacker))
remove_task(attacker)
if(task_exists(victim))
remove_task(victim)
SaveData(attacker) <---- to ta linia
return PLUGIN_HANDLED
}
oraz
public SaveData(id)
{
new authid[32];
get_user_authid(id,authid,31); <---------- ta linia
new vaultkey[64], vaultdata[64];
//Save their points
format(vaultkey,63,"jb-%s-points",authid);
format(vaultdata,63,"%d",playerpoints[id]);
set_vaultdata(vaultkey,vaultdata);
}
natomiast tablice zapisałem tak
new playerpoints[33]
Kto coś tu widzi źle?
Edit: Poprawione
Użytkownik daniosik edytował ten post 24.01.2011 18:20