I encountered another new-to-me error message, so let's fire it first:
Here's the method, 'id' being 'English' (string) and line 12 marked with red...
I hope someone can help me with this...
Well, it occured after I inserted my Multiple Language Script in a new project to work on it... strangely, this is the first time this error occurred, without myself changed something at the script at all... I tried several things including File.close (which should be redundant, as File.open closes the file at the end of the block according to my knowledge, but apparently... not XD ), but nothing worked...Errno::EMFILE occurred.
Too many open files - Language/English/Generic.txt
Here's the method, 'id' being 'English' (string) and line 12 marked with red...
Code:
def read_text(id)
[COLOR=Red]file = File.open("Language/" + @language + "/Generic.txt")[/COLOR]
content = file.readlines
for line in 0..content.size-1
if content[line].include?("*" + id)
temp_content = content[line]
temp_content.gsub!(("*" + id + " "), $game_system.read_text("000"))
end
end
return temp_content
end