廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 3169 個閱讀者
 
<<   1   2  下頁 >>(共 2 頁)
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
lichen
數位造型
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x42 鮮花 x95
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] 震撼僵屍debug-谁能解决= =
L 08/19/2010 - 13:21:48: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:21:48: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:21:48: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 13:22:03: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:22:03: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:22:03: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 13:22:24: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:22:24: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:22:24: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 13:22:41: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:22:41: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:22:41: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 13:22:55: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:22:55: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:22:55: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 13:23:11: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 13:23:11: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 13:23:11: [AMXX]    [0] zp_zclass_shockwave.sma::Death (line 321)

不想下載,直接看源碼
#include <amxmodx>
#include <fakemeta>
#include <xs>
#include <zombieplague>
#define SUPPORT_BOT_TO_USE //支援BOT使用.(在最前面加上 // 即取消对BOT的技援)
#define BOUNCE_EFFECT //被震波攻击到是否会被弹开.(在最前面加上 // 即取消这项效果)
#define DROP_GUN //被震波攻击到是否会掉下手上的枪.(在最前面加上 // 即取消这项效果)
#define Survivor_Speed_Multiplier 1.0 //倖存者缓速效果的乘数. 减缓后的速度=原本的速度*乘数 (如乘数是1.0 就等于是原本的速度)
#define Human_Speed_Multiplier 1.0 //人类缓速效果的乘数. 减缓后的速度=原本的速度*乘数 (如乘数是1.0 就等于是原本的速度)
#define How_High_Invalid_Attack 60.0 //在震波攻击范围内的目标,若高度和攻击者相差超出多少则判定攻击无效.(人物模型的高度大约是60.0)
#define PLUGIN_NAME "[ZP] Class:Shock Wave "
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "Jim"
const UNIT_SECOND = (1<<12)
#if defined DROP_GUN
// Weapon bitsums
const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)
#endif
// Shock Wave Zombie Attributes
new const zclass_name[] = { "震撼僵尸" } //丧尸名称
new const zclass_info[] = { "=让人类丢掉武器=" } //类型说明
new const zclass_model[] = { "deimos_zombi_host" } //人物模组
new const zclass_clawmodel[] = { "v_knife_zombideimos_host.mdl" } //手的模组
const zclass_health = 3000 //血量(HP)
const zclass_speed = 250 //移动速度
const Float:zclass_gravity = 1.0 //承受重力
const Float:zclass_knockback = 1.0 //被击退的数值
new const sound_shockwave[] = { "garg/gar_stomp1.wav" }
new bool:use_shockwave[33]
new bool:hit_key[33]
new bool:cooldown_started[33]
new bool:slowly_started[33], Float:slowly_begin_time[33]
new g_msgScreenShake,  g_shokewaveSpr
new g_zclass_shockwave
new g_shockwave_jump_height, g_shockwave_range, g_shockwave_effect_time, g_shockwave_cooldown
public plugin_init()
{
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
 
 g_shockwave_jump_height = register_cvar("zp_shockwave_jump_height", "300") //使用震波攻击时的跳跃高度
 g_shockwave_range = register_cvar("zp_shockwave_range", "250") //震波攻击的有效范围距离
 g_shockwave_effect_time = register_cvar("zp_shockwave_effect_time", "0.0") //受震波影响的时间长度(单位:秒)
 g_shockwave_cooldown = register_cvar("zp_shockwave_cooldown", "25.0") //使用震波攻击后的冷却时间(单位:秒)
 
 register_forward(FM_PlayerPostThink, "fw_PlayerPostThink", 1)
 register_forward(FM_StartFrame, "fw_StartFrame")
 
 register_event("ResetHUD","NewRound","be")
 register_event("DeathMsg", "Death", "a")
 
 g_msgScreenShake = get_user_msgid("ScreenShake")
}
public plugin_precache()
{
 engfunc(EngFunc_PrecacheSound, sound_shockwave)
 g_shokewaveSpr = engfunc(EngFunc_PrecacheModel, "sprites/shockwave.spr")
 
 g_zclass_shockwave = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public zp_user_infected_post(id, infector)
{
 if (zp_get_user_zombie_class(id) == g_zclass_shockwave)
 {
  client_print(id, print_chat, "【提示】靠近目标时,站在地面上按'R'键可以放出震波攻击,需要冷却时间%2.1f秒!", get_pcvar_float(g_shockwave_cooldown))
 }
}
public zp_user_humanized_post(id)
{
 use_shockwave[id] = false
 hit_key[id] = false
 cooldown_started[id] = false
 slowly_started[id] = false
}
public fw_StartFrame()
{
 // 设置检查的间格时间,防止刷新太快
 static Float:last_check_time
 if (get_gametime() - last_check_time < 0.1)
  return;
 last_check_time = get_gametime()
 
 static id
 for (id = 1; id <= 32; id++)
 {
  // Not alive or zombie
  if (!is_user_alive(id) || zp_get_user_zombie(id))
   continue;
  
  if (slowly_started[id])
  {
   #if defined BOUNCE_EFFECT
   new Float:time
   time = get_gametime() - slowly_begin_time[id]
   
   if (time >= (get_pcvar_float(g_shockwave_effect_time) + 1.0)) //将缓速效果的结束时间往后延迟1.0秒
   {
    slowly_started[id] = false
   }
   else if (time > 1.0) //设定延迟1.0秒后才產生缓速的效果,以防弹开的效果被抑制
   {
    if (zp_get_user_survivor(id))
     set_speed_to_velocity(id, Survivor_Speed_Multiplier) //减缓速度的效果 (对于被震波攻击到的"倖存者"玩家)
    else
     set_speed_to_velocity(id, Human_Speed_Multiplier) //减缓速度的效果 (对于被震波攻击到的"人类"玩家)
   }
   #else
   if (zp_get_user_survivor(id))
    set_speed_to_velocity(id, Survivor_Speed_Multiplier) //减缓速度的效果 (对于被震波攻击到的"倖存者"玩家)
   else
    set_speed_to_velocity(id, Human_Speed_Multiplier) //减缓速度的效果 (对于被震波攻击到的"人类"玩家)
   
   new Float:time
   time = get_gametime() - slowly_begin_time[id]
   
   if (time >= get_pcvar_float(g_shockwave_effect_time))
    slowly_started[id] = false
   #endif
  }
 }
}
public fw_PlayerPostThink(id)
{
 if (!is_user_alive(id) || !zp_get_user_zombie(id) || (zp_get_user_zombie_class(id) != g_zclass_shockwave))
  return PLUGIN_CONTINUE
 
 if (zp_get_user_nemesis(id))
  return PLUGIN_CONTINUE
 
 if (cooldown_started[id])
  return PLUGIN_CONTINUE
 
 if (!use_shockwave[id])
 {
  #if defined SUPPORT_BOT_TO_USE
  if (is_user_bot(id))
  {
   new enemy, body
   get_user_aiming(id, enemy, body) //检查是否正在瞄準某个目标
   
   if ((1 <= enemy <= 32) && !zp_get_user_zombie(enemy)) //检查是否是有效的目标
   {
    new Float:origin1[3], Float:origin2[3], Float:range
    pev(id, pev_origin, origin1);
    pev(enemy, pev_origin, origin2);
    range = get_distance_f(origin1, origin2)
    
    if (is_user_on_ground(id) && (range <= get_pcvar_float(g_shockwave_range)) && (floatabs(origin2[2] - origin1[2]) <= How_High_Invalid_Attack))
    {
     new height =  get_pcvar_num(g_shockwave_jump_height)
     if (height > 0)
     {
      fm_set_user_jump_velocity(id, height) //放震波之前的跳跃动作效果
      if (fm_get_speed(id) > 0)
       use_shockwave[id] = true
     }
     else
     {
      use_shockwave[id] = true
     }
    }
   }
  }
  else
  {
  #endif
  
  static button, oldbutton
  button = pev(id, pev_button)
  oldbutton = pev(id, pev_oldbuttons)
  
  if ((button & IN_RELOAD) && (oldbutton & IN_RELOAD))
  {
   if (!hit_key[id] && is_user_on_ground(id))
   {
    hit_key[id] = true
    new height =  get_pcvar_num(g_shockwave_jump_height)
    if (height > 0)
    {
     fm_set_user_jump_velocity(id, height) //放震波之前的跳跃动作效果
     if (fm_get_speed(id) > 0)
      use_shockwave[id] = true
    }
    else
    {
     use_shockwave[id] = true
    }
   }
  }
  else
  {
   hit_key[id] = false
  }
  
  #if defined SUPPORT_BOT_TO_USE
  }
  #endif
 }
 else
 {
  if (is_user_on_ground(id))
  {
   use_shockwave[id] = false
   screen_shake(id, 10) //让放震波攻击的玩家画面產生晃动
   PlaySound(id, sound_shockwave) //播放震撼效果的音效
   
   new Float:origin[3]
   pev(id, pev_origin, origin)
   create_blast(origin, 100, 100, 100, 200) //显示震波的环状效果
   search_in_range_target(id) //搜寻震波攻击有效范围内的玩家
   
   cooldown_started[id] = true
   //remove_task(id)
   set_task(get_pcvar_float(g_shockwave_cooldown), "cooldown_finish", id) //开始冷却时间倒数
  }
 }
 
 return PLUGIN_CONTINUE
}
public search_in_range_target(id)
{
 new Float:origin1[3], Float:origin2[3], Float:range
 pev(id, pev_origin, origin1);
 
 #if defined BOUNCE_EFFECT
 new Float:velocity[3]
 #endif
 
 for (new i = 1; i <= 32; i++)
 {
  if ((i != id) && is_user_alive(i) && !zp_get_user_zombie(i))
  {
   pev(i, pev_origin, origin2);
   range = get_distance_f(origin1, origin2)
   
   if (range <= get_pcvar_float(g_shockwave_range))
   {
    PlaySound(i, sound_shockwave) //播放震撼效果的音效
    
    if (floatabs(origin2[2] - origin1[2]) <= How_High_Invalid_Attack)
    {
     screen_shake(i, 10) //让被攻击到的玩家画面產生晃动
     
     #if defined BOUNCE_EFFECT
     get_speed_vector_to_entity(id, i, 500.0, velocity) //算出弹开时的向量,弹开速度设為500.0
     velocity[2] += 150.0 //加上弹开时的跳跃高度150.0
     set_pev(i, pev_velocity, velocity)
     #endif
     
     #if defined DROP_GUN
     if (!zp_get_user_survivor(i)) //设定若当玩家是倖存者时不会掉下手上的枪
      drop_current_weapon(i) //玩家丢掉目前手上的枪
     #endif
     
     slowly_started = true
     slowly_begin_time = get_gametime() //记绿缓速效果的开始时间
    }
   }
  }
 }
}
public cooldown_finish(id)
{
 if (cooldown_started[id] && (get_pcvar_float(g_shockwave_cooldown) >= 3.0)) //冷却时间偌低于3秒鐘,不会显示这个提示讯息
  client_print(id, print_center, "冷却时间%2.1f秒己过,你己经可以再使用地震攻击了!", get_pcvar_float(g_shockwave_cooldown))
 
 cooldown_started[id] = false
}
public client_connect(id)
{
 use_shockwave[id] = false
 hit_key[id] = false
 cooldown_started[id] = false
 slowly_started[id] = false
 
 return PLUGIN_CONTINUE
}
public client_disconnect(id)
{
 use_shockwave[id] = false
 hit_key[id] = false
 cooldown_started[id] = false
 slowly_started[id] = false
 
 return PLUGIN_CONTINUE
}
public NewRound(id)
{
 use_shockwave[id] = false
 hit_key[id] = false
 cooldown_started[id] = false
 slowly_started[id] = false
}
public Death()
{
 new player = read_data(2)
 use_shockwave[player] = false
 hit_key[player] = false
 cooldown_started[player] = false
 slowly_started[player] = false
}
screen_shake(id, amplitude = 4, duration = 2, frequency = 10)
{
 message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
 write_short(UNIT_SECOND*amplitude) // 振幅
 write_short(UNIT_SECOND*duration) // 时间
 write_short(UNIT_SECOND*frequency) // 频率
 message_end()
}
create_blast(const Float:originF[3], red, green, blue, brightness)
{
 // Smallest ring (小的光环)
 engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
 write_byte(TE_BEAMCYLINDER) // TE id (TE 的代码)
 engfunc(EngFunc_WriteCoord, originF[0]) // x (X 座标)
 engfunc(EngFunc_WriteCoord, originF[1]) // y (X 座标)
 engfunc(EngFunc_WriteCoord, originF[2]) // z (Y 座标)
 engfunc(EngFunc_WriteCoord, originF[0]) // x axis (X 轴)
 engfunc(EngFunc_WriteCoord, originF[1]) // y axis (Y 轴)
 engfunc(EngFunc_WriteCoord, originF[2]+400.0) // z axis (Z 轴)
 write_short(g_shokewaveSpr) // sprite (Sprite 物件代码)
 write_byte(0) // startframe (帧幅开始)
 write_byte(0) // framerate (帧幅频率)
 write_byte(4) // life (时间长度)
 write_byte(60) // width (宽度)
 write_byte(0) // noise (响声)
 write_byte(red) // red (顏色 R)
 write_byte(green) // green (顏色 G)
 write_byte(blue) // blue (顏色 B)
 write_byte(brightness) // brightness (顏色亮度)
 write_byte(0) // speed (速度)
 message_end()
 
 // Medium ring (中的光环)
 engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
 write_byte(TE_BEAMCYLINDER) // TE id
 engfunc(EngFunc_WriteCoord, originF[0]) // x
 engfunc(EngFunc_WriteCoord, originF[1]) // y
 engfunc(EngFunc_WriteCoord, originF[2]) // z
 engfunc(EngFunc_WriteCoord, originF[0]) // x axis
 engfunc(EngFunc_WriteCoord, originF[1]) // y axis
 engfunc(EngFunc_WriteCoord, originF[2]+300.0) // z axis
 write_short(g_shokewaveSpr) // sprite
 write_byte(0) // startframe
 write_byte(0) // framerate
 write_byte(4) // life
 write_byte(60) // width
 write_byte(0) // noise
 write_byte(red) // red
 write_byte(green) // green
 write_byte(blue) // blue
 write_byte(brightness) // brightness
 write_byte(0) // speed
 message_end()
 
 // Largest ring (大的光环)
 engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
 write_byte(TE_BEAMCYLINDER) // TE id
 engfunc(EngFunc_WriteCoord, originF[0]) // x
 engfunc(EngFunc_WriteCoord, originF[1]) // y
 engfunc(EngFunc_WriteCoord, originF[2]) // z
 engfunc(EngFunc_WriteCoord, originF[0]) // x axis
 engfunc(EngFunc_WriteCoord, originF[1]) // y axis
 engfunc(EngFunc_WriteCoord, originF[2]+200.0) // z axis
 write_short(g_shokewaveSpr) // sprite
 write_byte(0) // startframe
 write_byte(0) // framerate
 write_byte(4) // life
 write_byte(60) // width
 write_byte(0) // noise
 write_byte(red) // red
 write_byte(green) // green
 write_byte(blue) // blue
 write_byte(brightness) // brightness
 write_byte(0) // speed
 message_end()
}
PlaySound(id, const sound[])
{
 if (equal(sound[strlen(sound)-4], ".mp3"))
  client_cmd(id, "mp3 play ^"sound/%s^"", sound)
 else
  client_cmd(id, "spk ^"%s^"", sound)
}
stock set_speed_to_velocity(id, Float:scalar = 1.0)
{
 // Get our current velocity
 static Float:velocity[3]
 pev(id, pev_velocity, velocity)
 xs_vec_mul_scalar(velocity, scalar, velocity)
 set_pev(id, pev_velocity, velocity)
 
 return 1;
}
stock bool:is_user_on_ground(index)
{
 if (pev(index, pev_flags) & FL_ONGROUND)
  return true;
 
 return false;
}
stock fm_set_user_jump_velocity(index, jump_height)
{
 static Float:velocity[3]
 pev(index, pev_velocity, velocity)
 velocity[2] = float(jump_height)
 set_pev(index, pev_velocity, velocity)
 
 return 1;
}
stock fm_get_speed(entity)
{
 static Float:velocity[3]
 pev(entity, pev_velocity, velocity)
 
 return floatround(vector_length(velocity));
}
#if defined BOUNCE_EFFECT
stock get_speed_vector_to_entity(ent1, ent2, Float:speed, Float:new_velocity[3])
{
 if(!pev_valid(ent1) || !pev_valid(ent2))
  return 0;
 
 static Float:origin1[3]
 pev(ent1,pev_origin,origin1)
 static Float:origin2[3]
 pev(ent2,pev_origin,origin2)
 
 new_velocity[0] = origin2[0] - origin1[0];
 new_velocity[1] = origin2[1] - origin1[1];
 new_velocity[2] = origin2[2] - origin1[2];
 
 static Float:num
 num = speed / vector_length(new_velocity);
    
 new_velocity[0] *= num;
 new_velocity[1] *= num;
 new_velocity[2] *= num;
 
 return 1;
}
#endif
#if defined DROP_GUN
stock drop_current_weapon(id)
{
 static weapon_id, clip, ammo
 weapon_id = get_user_weapon(id, clip, ammo)
 
 if (((1<<weapon_id) & PRIMARY_WEAPONS_BIT_SUM) || ((1<<weapon_id) & SECONDARY_WEAPONS_BIT_SUM))
 {
  static weapon_name[32]
  get_weaponname(weapon_id, weapon_name, sizeof weapon_name - 1)
  engclient_cmd(id, "drop", weapon_name)
 }
}
#endif


本帖包含附件
zip zp_zclass_shockwave.rar   (2022-06-09 14:16 / 5 KB)  
說明: SMA-debug
下載次數:18


[ 此文章被lichen在2010-08-19 21:34重新編輯 ]



獻花 x0 回到頂端 [樓 主] From:沒有資料 | Posted:2010-08-19 14:15 |
觀眾甲
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x318 鮮花 x963
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

不會用code嗎?原版有什麼bug?
錯區羅...


獻花 x0 回到頂端 [1 樓] From:香港有線寬頻 | Posted:2010-08-19 14:53 |
Rubbish-Nec 手機 會員卡
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎 社區建設獎 優秀管理員勳章 特殊貢獻獎-2
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x214 鮮花 x701
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

不要加入unicode署名
不要自動換行
就可以了
威望要 37 以上才可以下載附件,您目前威望不足,請勿購買


本帖包含附件
zip scripting.rar   (2022-06-09 14:16 / 18 KB)   下載次數:4 需要威望:37


已成過去的中二少年。
獻花 x0 回到頂端 [2 樓] From:沒有資料 | Posted:2010-08-19 15:15 |
lichen
數位造型
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x42 鮮花 x95
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

谢谢了!!!
太感谢了!!!


獻花 x0 回到頂端 [3 樓] From:沒有資料 | Posted:2010-08-19 15:22 |
z58896258
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x0
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

哈 哈哈 看不懂..........


獻花 x0 回到頂端 [4 樓] From:台灣中華電信 | Posted:2010-08-19 16:11 |
a7811311622 手機
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎 優秀管理員勳章 社區建設獎
頭銜:我…在工作了…我…在工作了…
版主
級別: 版主 該用戶目前不上站
版區: CS提問區
推文 x771 鮮花 x2152
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

下面是引用 Rubbish-Nec 於 2010-08-19 15:15 發表的 : 到引言文
不要加入unicode署名
不要自動換行
就可以了

我覺得那錯誤的問題根本不在這些…表情
如果要DEBUG要在把
複製程式
 
public Death() 
{ 
 new player = read_data(2) 
 use_shockwave[player] = false 
 hit_key[player] = false 
 cooldown_started[player] = false 
 slowly_started[player] = false 
} 

改成
複製程式
 
public Death() 
{ 
 new player = read_data(2) 
 if (!(1 <= player <= 32)) return; 
 use_shockwave[player] = false 
 hit_key[player] = false 
 cooldown_started[player] = false 
 slowly_started[player] = false 
} 

這樣才算有DEBUG的效果…表情


尚無簽名,歡迎 [新增個性化簽名]
獻花 x1 回到頂端 [5 樓] From:台灣中華電信 | Posted:2010-08-19 17:54 |
lichen
數位造型
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x42 鮮花 x95
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

发现用了Rubbis给我修复的插件,还是报错! = =
L 08/19/2010 - 19:40:49: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 19:40:49: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 19:40:49: [AMXX]   [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 19:41:20: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 19:41:20: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 19:41:20: [AMXX]   [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 19:41:28: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 19:41:28: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 19:41:28: [AMXX]   [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 19:42:22: [AMXX] Displaying debug trace (plugin "zp_zclass_shockwave.amxx")
L 08/19/2010 - 19:42:22: [AMXX] Run time error 4: index out of bounds
L 08/19/2010 - 19:42:22: [AMXX]   [0] zp_zclass_shockwave.sma::Death (line 321)
L 08/19/2010 - 19:43:18: String formatted incorrectly - parameter 6 (total 5)


獻花 x0 回到頂端 [6 樓] From:沒有資料 | Posted:2010-08-19 20:14 |
freeze02468
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x0 鮮花 x21
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

這程式碼貞多...
看了都投婚眼花...


獻花 x0 回到頂端 [7 樓] From:臺灣中華電信 | Posted:2010-08-29 13:11 |
HsK 手機 會員卡
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎 優秀管理員勳章
頭銜:CCN@HsKCCN@HsK
版主
級別: 版主 該用戶目前不上站
版區: CS插件區
推文 x1701 鮮花 x1108
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

下面是引用 a7811311622 於 2010-08-19 17:54 發表的 : 到引言文
 
我覺得那錯誤的問題根本不在這些…表情  
如果要DEBUG要在把
複製程式
 
public Death() 
{ 
 new player = read_data(2) 
 use_shockwave[player] = false 
 hit_key[player] = false 
 cooldown_started[player] = false 
 slowly_started[player] = false 
} 

改成
複製程式
 
public Death() 
{ 
 new player = read_data(2) 
 if (!(1 <= player <= 32)) return; 
 use_shockwave[player] = false 
 hit_key[player] = false 
 cooldown_started[player] = false 
 slowly_started[player] = false 
} 

這樣才算有DEBUG的效果…表情

複製程式
 public Death() 
{ 
 new player = read_data(2) 
 if (!player) return; 
 use_shockwave[player] = false 
 hit_key[player] = false 
 cooldown_started[player] = false 
 slowly_started[player] = false 
} 


[/pre]也行吧.......[/pre]


HsK-Dev Blog By CCN
獻花 x1 回到頂端 [8 樓] From:香港有線寬頻 | Posted:2010-08-29 14:44 |
天真偉少
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x1
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

眼也花了- -


獻花 x0 回到頂端 [9 樓] From:未知地址 | Posted:2010-12-29 13:24 |

<<   1   2  下頁 >>(共 2 頁)
首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.030979 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言