Jump to content

[Error] Convert itemproto


Recommended Posts

 Hey devs,
I have problem with converting item proto using convertproto.py 
if any1 can correct it will be good 

i was using this https://metin2dev.org/board/index.php?/topic/996-item_proto-convert-40k/ 

I get error while converting

  Hide contents

  File "convert_proto.py", line 857, in item_proto
    item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\""  + get_item_type(row[3], row[0]) + "\"" , "\""  + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
TypeError: cannot concatenate 'str' and 'long' objects
 


I tell you why it is happening normal convert proto the vnum_range will be last so it wont make problem but here we added vnum_range next to vnum that is row 2... so its making problem So any one who correct this will be helpful i tried but it says 

" TypeError: not enough arguments for format string " 

Here is my Convert proto.py 

Error section 
 

  Hide contents

    out_file_itemproto = open("item_proto.txt", "w")
    out_file_itemnames = open("item_names.txt", "w")
    print "Converting item_proto..."
    for row in rows:
        item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\""  + get_item_type(row[3], row[0]) + "\"" , "\""  + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
        item_names_line = "%s\t%s" % (row[0], row[2])
        out_file_itemproto.write(item_proto_line + "\r\n")
        out_file_itemnames.write(item_names_line + "\r\n")
    out_file_itemproto.close()


Thanks in Advance 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.