當前位置:首頁 » 網頁前端 » rpg游戲腳本出錯
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

rpg游戲腳本出錯

發布時間: 2023-04-04 18:32:38

㈠ 製作RPG游戲腳本錯誤

腳本太多了,先重新復制一遍,或者把它移到最靠近Main的上面那個,不行的話就刪除一些腳本

㈡ rpg maker xp沒有修改腳本可他卻說腳本錯誤,請問是怎麼回事

有可能鏈宴粗是修改了游戲根目錄祥旅中的素材名稱,使得腳本找不到指定文件就會發生這種情況。
將文件名修棚鎮改回原來的。或者重裝RMXP。

㈢ RPG製作大師VX執行商店腳本出錯,求高手幫忙

這個可能是願有腳本和新添腳本的沖突造畝毀成的~
你可以刪除214行,如仿頌果不行。
可能只有迅大備刪除新添腳本或者新建游戲復制原來腳本進行修補、

㈣ 一個RPG游戲,到某一個關卡就提示彈出腳本問題,請問該怎麼解決。

樓主對你的問題,我也遇到過。我是這樣解決的:
首先使用本文中的故障排除方法時要按它們出現的順序進行。在您完成一個故障排除部分後,請進行測試以確定是否仍發生此腳本錯誤。如果問題已解決,則不必繼續下一部分。如果問題未解決,則繼續執行下一部分。

從另一個用戶帳戶、另一個瀏覽器和另一台計算機測試網頁
如果問題只在您查看一個或兩個網頁時發生,則從另一個用戶帳戶、另一個瀏覽器或另一台計算機查看這歷脊些網頁,以確定問題是否依然存在。如果腳本錯誤依然存在,則可能是網頁的編寫有問題。請與網站管理員或內容開發者聯系,告訴他們網頁存在的問題。如果從另一個用戶帳戶使用網頁時腳本錯誤未發生,則問題可能是您的用戶配置文件的文件或設置造成的。如果在從另一個瀏覽器或另一台計算機使用網頁時腳本錯誤未發生,則繼續進行故障排除操作。

確認活動腳本、ActiveX 和 Java 未被阻止
確認您計算機上的 Internet Explorer 或另外一種程序(如防病察孫毒程序或防火牆)未配置為阻止活動腳本、ActiveX 控制項或 Java 小程序。在 Internet Explorer 的「高」安全級別,活動腳本、ActiveX 控制項和 Java 小程序被關閉。默認情況下,Internet Explorer 6 和某些 Internet Explorer 5.x 版本針對受限站點敗爛鏈區域使用「高」安全級別。默認情況下,Microsoft Windows Server 2003 針對受限站點區域和 Internet 區域使用「高」安全級別。如要為當前網頁重置 Internet Explorer 安全設置,請按照下列步驟操作:1. 啟動 Internet Explorer。
2. 在「工具」菜單上,單擊「Internet 選項」。
3. 在「Internet 選項」對話框中,單擊「安全」。
4. 單擊「默認級別」。
5. 單擊「確定」。
請參見您使用的防病毒程序或防火牆的文檔資料,以確定如何打開腳本、ActiveX 和 Java 小程序。

確認您的防病毒程序未設置為掃描「臨時 Internet 文件」或「已下載的程序文件」文件夾
請參見您使用的防病毒程序的文檔資料,以確定如何防止該程序掃描「臨時 Internet 文件」或「已下載的程序文件」文件夾。

刪除所有臨時的 Internet 相關文件
從您的計算機中刪除所有臨時的 Internet 相關文件。為此,請按照下列步驟操作:1. 啟動 Internet Explorer。
2. 在「工具」菜單上,單擊「Internet 選項」。
3. 單擊「常規」選項卡。
4. 在「Internet 臨時文件」下,單擊「設置」。
5. 單擊「刪除文件」。
6. 單擊「確定」。
7. 單擊「刪除 Cookies」。
8. 單擊「確定」。
9. 在「歷史記錄」下,單擊「清除歷史記錄」,然後單擊「是」。
10. 單擊「確定」。 OK完畢

㈤ rpg maker xp 讀取腳本失敗是怎麼回事

腳本數據文件損壞。
處理方法:
新建一個新的工程,並把新工程目錄下Data文件夾內的Scripts文件復制到你的游戲的Data文件夾下。
(如果你有加入過插件腳本,請重新插入。)

㈥ RPG製作大師 腳本錯誤

腳本不能亂刪啊,每一個腳皮態本都跟其他腳本對應純旅,以Scene開頭的所有腳本基本都有關聯,刪了當然不行了,所謂的第八行出燃褲源錯也就是沒有關聯項目,無法運行導致的

㈦ rpg製作大師腳本出錯!

Window_Base是游戲中全部明棚窗口的超級類,可以嘗試將腳本編輯器里的Window_Base項刪除,然後從正常的rm里重新粘激物則貼一個過來,看看是不是就沒問題了

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# 游戲中全部窗口的超級類。
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# ● 初始化對像
# x : 窗口螞晌的 X 坐標
# y : 窗口的 Y 坐標
# width : 窗口的寬
# height : 窗口的寬
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super()
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
self.x = x
self.y = y
self.width = width
self.height = height
self.z = 100
end
#--------------------------------------------------------------------------
# ● 釋放
#--------------------------------------------------------------------------
def dispose
# 如果窗口的內容已經被設置就被釋放
if self.contents != nil
self.contents.dispose
end
super
end
#--------------------------------------------------------------------------
# ● 獲取文字色
# n : 文字色編號 (0~7)
#--------------------------------------------------------------------------
def text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
normal_color
end
end
#--------------------------------------------------------------------------
# ● 獲取普通文字色
#--------------------------------------------------------------------------
def normal_color
return Color.new(255, 255, 255, 255)
end
#--------------------------------------------------------------------------
# ● 獲取無效文字色
#--------------------------------------------------------------------------
def disabled_color
return Color.new(255, 255, 255, 128)
end
#--------------------------------------------------------------------------
# ● 獲取系統文字色
#--------------------------------------------------------------------------
def system_color
return Color.new(192, 224, 255, 255)
end
#--------------------------------------------------------------------------
# ● 獲取危機文字色
#--------------------------------------------------------------------------
def crisis_color
return Color.new(255, 255, 64, 255)
end
#--------------------------------------------------------------------------
# ● 獲取戰斗不能文字色
#--------------------------------------------------------------------------
def knockout_color
return Color.new(255, 64, 0)
end
#--------------------------------------------------------------------------
# ● 刷新畫面
#--------------------------------------------------------------------------
def update
super
# 如果窗口的外關被變更了、再設置
if $game_system.windowskin_name != @windowskin_name
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
end
end
#--------------------------------------------------------------------------
# ● 圖形的描繪
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 名稱的描繪
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#--------------------------------------------------------------------------
# ● 職業的描繪
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
#--------------------------------------------------------------------------
# ● 水平的描畫
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 生辰成描繪用狀態字元串
# actor : 角色
# width : 描畫目標的寬度
# need_normal : [正常] 是否為必須 (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# 獲取括弧的寬
brackets_width = self.contents.text_size("[]").width
# 生成狀態名字元串
text = ""
for i in battler.states
if $data_states[i].rating >= 1
if text == ""
text = $data_states[i].name
else
new_text = text + "/" + $data_states[i].name
text_width = self.contents.text_size(new_text).width
if text_width > width - brackets_width
break
end
text = new_text
end
end
end
# 狀態名空的字元串是 "[正常]" 的情況下
if text == ""
if need_normal
text = "[正常]"
end
else
# 加上括弧
text = "[" + text + "]"
end
# 返回完成後的文字類
return text
end
#--------------------------------------------------------------------------
# ● 描繪狀態
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
# width : 描畫目標的寬
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#--------------------------------------------------------------------------
# ● 描畫 EXP
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "E")
self.contents.font.color = normal_color
self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
end
#--------------------------------------------------------------------------
# ● 描繪 HP
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
# width : 描畫目標的寬
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# 描繪字元串 "HP"
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# 計算描繪 MaxHP 所需的空間
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# 描繪 HP
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# 描繪 MaxHP
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#--------------------------------------------------------------------------
# ● 描繪 SP
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
# width : 描畫目標的寬
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# 描繪字元串 "SP"
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# 計算描繪 MaxSP 所需的空間
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# 描繪 SP
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# 描繪 MaxSP
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#--------------------------------------------------------------------------
# ● 描繪能力值
# actor : 角色
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
# type : 能力值種類 (0~6)
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 描繪物品名
# item : 物品
# x : 描畫目標 X 坐標
# y : 描畫目標 Y 坐標
#--------------------------------------------------------------------------
def draw_item_name(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
end