I'm new to rpgmaker and ruby...
When I try to use this script in a japaneese rpg game it gave me a error in line 1359
"result = LanguageFileSystem::database[sUBCLASS_KEYS[self.class]][var.to_sym]"
It says "Type Error... Cannot convert symbol into integer..."
if there is a way to correct this please let me know
Hi,
I have the same problem than Mekos and Prasadmadnayake.
Script 'Language Extractor' line 1635 : NoMethodError occured.
Undefined method '[]' for nil:NilClass
In this part of code :
class RPG::BaseItem #-------------------------------------------------------------------------- # * Maps database object class to the corresponding key in the language # file hash to improve polymorphism of the implementation #-------------------------------------------------------------------------- SUBCLASS_KEYS = {RPG::Actor => :actors, RPG::Class => :classes, RPG::Skill => :skills, RPG::Item => :items, RPG::Weapon => :weapons, RPG::Armor => :armors, RPG::Enemy => :enemies, RPG::State => :states} #-------------------------------------------------------------------------- # * Read attribute from language file hash (Metaprogramming ninjutsu ) #-------------------------------------------------------------------------- ["name", "description", "note"].each do |var| alias_method "lfs_#{var}".to_sym, "#{var}".to_sym define_method("#{var}") do if LanguageFileSystem::USE_DATABASE_FILES result = LanguageFileSystem::database[SUBCLASS_KEYS[self.class]][var.to_sym] result = result[@id] if result end result ||= instance_variable_get("@#{var}") end endendThis is the line 1635 ===>
result = LanguageFileSystem::database[SUBCLASS_KEYS[self.class]][var.to_sym]I think, it's about the language Format. In Asia, it's not UTF-8. I don't know. I have my windows in Japanese Language to can run this game like this tutorial :
3. Change regional settings to Japanese
Occasionally a Japanese game will not even run with Applocale set to Japanese. Another option is to change the regional settings for non-unicode programs on your computer to Japanese so all programs run in the Japanese region setting. How to do this varies for Windows XP and Windows Vista and it may require a restart. You can always change back to your normal regional settings later after you have finished playing.
Well, i have try to put the problem line in commentary. But when i put the line problem in commentary, i have this error :
Script 'Language Extractor' line 890 : Argument Error Occured.
Invalid byte sequence in UTF-8
This is the function in Line 890 : (Start at 886)
def load_language saved_lang = nil open("Game.ini") { |f| f.each_line { |l| GAME_INI_ENTRY.match(l) { |m| saved_lang = m[1].to_sym break } } } @language = saved_lang if saved_lang endSo, i need help to fix it... maybe, i must do something that i don't know about.
😀
This is for the game Elements ! Than i try to translate in English. (It have no translation in english)