yuyuko190 Posted October 21, 2014 Posted October 21, 2014 [Problem Solved] I work on vietnamese translation for sengoku gensokyo (engine kirikiri2) but i got a problem. Here's error log 12:27:14 ==== An exception occured at _data-make.ks(328)[(top level script) global], VM ip = 16084 ==== 12:27:14 -- Disassembled VM code -- 12:27:14 #(328) f.thchara[48][3] = 0; f.thchara[49][3] = 0; 12:27:14 00016063 const %1, *820 // *820 = (int)0 12:27:14 00016066 gpd %2, %-2.*805 // *805 = (string)"f" 12:27:14 00016070 gpd %3, %2.*813 // *813 = (string)"thchara" 12:27:14 00016074 const %4, *821 // *821 = (int)48 12:27:14 00016077 gpi %5, %3.%4 12:27:14 00016081 const %6, *822 // *822 = (int)3 12:27:14 00016084 spie %5.%6, %1 12:27:14 -- Register dump -- 12:27:14 %-3=(int)6 %-2=(object)(object 0x0012DACC:0x00000000) 12:27:14 %-1=(object)(object 0x00C68228:0x00C68228) %0=(void) %1=(int)0 12:27:14 %2=(object)(object 0x01503EC8:0x01503EC8) %3=(object)(object 0x0EBA574C:0x0EBA574C) 12:27:14 %4=(int)48 %5=(void) %6=(int)3 %7=(int)21 %8=(int)1 %9=(int)0 %10=(string)" 分 " 12:27:14 %11=(object)(object 0x01503EC8:0x01503EC8) %12=(object)(object 0x0EAC8A14:0x0EAC8A14) 12:27:14 %13=(int)2 %14=(int)0 %15=(string)" 秒" %16=(object)(object 0x01503EC8:0x01503EC8) 12:27:14 %17=(object)(object 0x0EAC8A14:0x0EAC8A14) %18=(int)3 12:27:14 ---------------------------------------------------------------------------------------------- 12:27:14 trace : 12:27:14 エラーが発生しました ファイル : _data-make.ks 行 : 473 タグ : ( ← エラーの発生した前後のタグを示している場合もあります ) _data-make.ks の 行 4 から始まる iscript ブロックでエラーが発生しました。 ( 詳細はコンソールを参照してください ) (void) から Object へ型を変換できません。Object 型が要求される文脈で Object 型以外の値が渡されるとこのエラーが発生します It happen when i try convert csv files to USC2-Little endian. Anyone know how to fix this problem? I'm very thankful. Quote
Quibi Posted October 23, 2014 Posted October 23, 2014 What exactly is the change that causes this problem? Is it just converting a single CSV file to UCS-2-LE? Quote
yuyuko190 Posted October 23, 2014 Author Posted October 23, 2014 It happened when i converted csv file to US2-LE. I don't know why can't encode csv file to usc2-le. Quote
Quibi Posted October 23, 2014 Posted October 23, 2014 Can you upload the file _data-make.ks and the csv file for me? I'll have a look at it. Quote
yuyuko190 Posted October 24, 2014 Author Posted October 24, 2014 Yes, it's here https://www.mediafire.com/folder/53t7xhi6ralxy/csv Quote
Quibi Posted October 24, 2014 Posted October 24, 2014 Hmm, I think it might need modifying a file called "CSVParser". Can you upload it as well? yuyuko190 1 Quote
yuyuko190 Posted October 24, 2014 Author Posted October 24, 2014 Here's that file http://www.mediafire.com/download/3s6sq6ccq3syqua/csvParser.dll Quote
Kelebek1 Posted October 24, 2014 Posted October 24, 2014 The game is SJIS, you can't just change the encoding and expect it to work... Are you sure the game even supports UTF? Quote
Quibi Posted October 24, 2014 Posted October 24, 2014 Found a piece of code on the internet, so try this for me. Go to the file "_data-make.ks" and look for the line: // #################### 東方キャラのデータCSVを読み込み #################### And just after it paste the following code: Plugins.link("csvParser.dll"); with(global.CSVParser) { .origParseStorage = .parseStorage; .parseStorage = function (filename, utf8) {this.parse([].load(filename).join('\n'));}; //for utf-16 CSV .initStorage = function (filename) {this.StorageBuffer = [].load(filename); this.StorageBuffer.reverse();}; .getNextLine = function () { if (this.StorageBuffer!==void) { var retData=this.StorageBuffer.pop(); if (retData!==void) return retData.split('\t'); } }; }; Not sure it would work but worth a try... Found it here btw: https://github.com/regomne/chinesize/blob/master/kirikiri2/csvParser.txt Quote
yuyuko190 Posted October 25, 2014 Author Posted October 25, 2014 I tried it. But it causes same error for other scripts. Quote
Quibi Posted October 25, 2014 Posted October 25, 2014 What do you mean same error for other scripts? Meaning it works in this script? I know that for kirikiri to work in unicode, you need to convert ALL the scripts in to the UCS-2 encoding... So this is also something you can try. Quote
yuyuko190 Posted October 26, 2014 Author Posted October 26, 2014 Yes, it works in _data_make, but i got error in other places 11:39:49 --------------------------------------------------------------------------------------------- 11:39:49 trace : mainwindow.tjs(4726)[(function expression) (anonymous)] <-- conductor.tjs(440)[(function) onTag] <-- conductor.tjs(104)[(function) timerCallback] 11:39:49 エラーが発生しました ファイル : _data-event.ks 行 : 90 タグ : endlink ( ← エラーの発生した前後のタグを示している場合もあります ) (void) から Object へ型を変換できません。Object 型が要求される文脈で Object 型以外の値が渡されるとこのエラーが発生します 11:39:59 0 Quote
Quibi Posted November 13, 2014 Posted November 13, 2014 I have another idea. First, take the original "_data-make.ks" file (without the change I suggested earlier). Change every: initStorage("file_name") To: initStorage("file_name", true) Where of course "file_name" is the file name written there (just keep it). After you do that change all your csv files to use utf-8 encoding. This should work... but if it doesn't I have one last change that might help (only try if the above doesn't work, and use this change in addition to the above one): Change every: CSVParser() To: CSVParser(,"\r\n") Idea taken from the parser documentation: http://www.geocities.jp/keep_creating/DojinDOC/krkrDefaultPlugins.html Let me know if it helps yuyuko190 1 Quote
yuyuko190 Posted December 7, 2014 Author Posted December 7, 2014 It's done. Thanks for your great help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.