自分で作ったキャラがあり、それを登録するという簡単なものですが
なぜか実行ファイルにすると、ファイルを開く段階でエラーが出てしまいます。
(エクスプローラ上で、実行ファイルの上に目的のselect.defをドラックドロップして実行する形式です)
これは、ドラックドロップのコマンドラインが通常のコマンドプロンプトとは違うのか、
あるいは他に原因があるのでしょうか?
なお画面のX SIZE,Y SIZEは画面の横枠・縦枠の数です。枠の大きさではありません。
MUGENについて→http://www.elecbyte.com/mugen/
#packopt name "mugenSelect-def" #include "mod_regexp.as" #include "hsp3util.as" #module #deffunc d4box int x, int cx, int cy, int r, int g, int b, str sn, str st color 0, 0, 0 line cx, cy, cx+x, cy line cx, cy, cx, cy+x line cx, cy+x, cx+x, cy+x line cx+x, cy, cx+x, cy+x color r, g, b boxf cx+1, cy+1, cx+x-1, cy+x-1 color 0, 0, 0 pos cx+2, cy+2 font msgothic, 10.5 mes sn st2 = replace( st, "/", "\\" ) mes getpath( st2, 9 ) return #global title "MUGEN Select.def Editor" extlist = "" screen 0, 300, 200, 4 x = 0 : y = 0 : cellsize = 40 chardir="C:\\mugen" mes "SIZE X:" input x mes "SIZE Y:" input y mes "CELL SIZE:" input cellsize mes "MUGEN DIR" objsize 300, input chardir button "OK", *home stop *home xc = 0 yc = 0 sdim name, 30, x*y foreach name : name( cnt ) = "<---SPACE--->" : loop sdim stage, 100, x*y foreach stage : stage( cnt ) = ";(NO STAGE)" : loop gosub *load screen 0, 1280, 720, 0, 15, 15 width cellsize*x,720 x = int( x ) y = int( y ) cellsize = int( cellsize ) chdir chardir chdir "chars" lc="" dirlist lc, "*", 5 lc += "<---SPACE--->" chdir ".." chdir "stages" lc2="" dirlist lc2, "*.def", 1 lc2 += ";(NO STAGE)" notesel lc2 foreach stageindex : kc2 = notemax-1 : stageindex.cnt = kc2 : loop noteunsel chdir "..\\chars" pos 0, y*cellsize mes "CHARACTER TARGET:" objsize 300, gname="" gstage="" listbox kc, 70, lc namebox = stat button "(Edit Char.DEF)", *edit button "(Open Directory)", *opendir mes "COMMON STAGE:" listbox kc2, 50, lc2 stagebox = stat button "(ADD EXTRA)", *addext button "(Edit Stg.DEF)", *edit2 k="" button gosub "OK", *chg pos x/2*cellsize, y*cellsize mes "EXTRA STAGES:" listbox kc3, 120, extlist gs = stat button "DELETE", *delext mes "" mes "" button "CHARS ALL CLEAR", *clear mes "" mes "" button "RELOAD", *home *main repeat gosub *drawcell stick kk, 15 if kk & 1 : xc-- : if xc < 0 : xc = x-1 if kk & 2 : yc-- : if yc < 0 : yc = y-1 if kk & 4 : xc++ : if xc >= x : xc = 0 if kk & 8 : yc++ : if yc >= y : yc = 0 if kk == 128 : gosub *save if kk == 32 : gosub *move onclick gosub *clicked if kk == 1024 : gosub *chg await 1 loop *clear foreach name : name( cnt ) = "<---SPACE--->" : loop foreach stage : stage( cnt ) = ";(NO STAGE)" : loop goto *main *opendir notesel lc noteget txt,kc exec "explorer "+txt goto *main *edit notesel lc noteget txt,kc noteunsel exec "NOTEPAD.EXE \""+txt+"\\"+txt+".def\"" goto *main *edit2 notesel lc2 noteget txt,kc2 noteunsel exec "NOTEPAD.EXE \"..\\stages\\"+txt+"\"" goto *main *clicked if ( mousex <= cellsize*x ) and ( mousey <= cellsize*y ){ xc = mousex/cellsize yc = mousey/cellsize } return *addext notesel lc2 noteget txt, kc2 noteunsel notesel extlist noteadd "stages/"+txt, -1, 0 noteunsel objprm gs, extlist goto *main *delext if kc3 != -1{ notesel extlist notedel kc3 noteunsel objprm gs, extlist } goto *main *move notesel lc repeat notemax noteget txt, cnt if txt == name( yc*x+xc ) : kc = cnt objprm namebox, kc loop noteunsel return *drawcell redraw 0 repeat y c = cnt repeat x if ( cnt == xc ) and ( c == yc ){ d4box cellsize, cnt*cellsize, c*cellsize, $ff, $ff, 0, name( c*x+cnt ), stage( c*x+cnt ) }else{ if name( c*x+cnt ) == "<---SPACE--->"{ d4box cellsize, cnt*cellsize, c*cellsize, $ff, $80, 0, name( c*x+cnt ), stage( c*x+cnt ) }else{ d4box cellsize, cnt*cellsize, c*cellsize, 0, $ff, $ff, name( c*x+cnt ), stage( c*x+cnt ) } } loop loop redraw 1 return *chg notesel lc noteget txt, kc noteunsel notesel lc2 noteget txt2, kc2 noteunsel name( yc*x+xc ) = txt stage( yc*x+xc ) = "stages/" + txt2 goto *main *save dialog "def", 17, "MUGEN SELECT.DEF" if stat != 1 : return savebuf="" notesel savebuf noteadd "[Characters]", 0, 1 foreach name noteadd name( cnt ) + ", " + stage( cnt ), -1, 0 loop noteadd "[ExtraStages]", -1, 0 noteadd extlist, -1, 0 noteadd "[Options]", -1, 0 noteadd "arcade.maxmatches = 6,1,1,0,0,0,0,0,0,0", -1, 0 noteadd "team.maxmatches = 4,1,1,0,0,0,0,0,0,0", -1, 0 notesave refstr noteunsel return *load c = dir_cmdline if c != ""{ buf="" notesel buf noteload c repeat notemax noteget txt, cnt if txt == "[Characters]" : stch = cnt+1 if txt == "[ExtraStages]" : edch = cnt-1 : stex = cnt+1 if txt == "[Options]" : edex = cnt-1 loop repeat edch-stch, stch noteget txt, cnt if instr( txt, 0, match( txt, "\\s*;" ) ) == 0 : skipped++ : continue //ステージ割り振りがあるかチェック if instr( txt, 0, "," ) != -1{ chname = stname = "" split txt, ",", chname, stname name( cnt-stch-skipped ) = chname if stname != "" : stage( cnt-stch-skipped ) = replace( stname, "\\s\\s+", "" ) }else{ if ( txt != "" ) or ( txt != "<---SPACE--->" ){ name( cnt-stch-skipped ) = txt stage( cnt-stch-skipped ) = ";(NO STAGE)" }else{ name( cnt-stch-skipped ) = "<---SPACE--->" stage( cnt-stch-skipped ) = ";(NO STAGE)" } } loop repeat edex-stex, stex noteget txt, cnt extlist += txt + "\n" loop } return