tail does not match

Discussion in 'Fallout General Modding' started by hakimio, Mar 25, 2009.

  1. hakimio

    hakimio It Wandered In From the Wastes

    165
    Feb 27, 2009
    Tried decompiling some scripts present in lootable armour mod with Noid compiler, but every time I get:
    Code:
    Error decompiling `somescript.int': tail does not match
    Decompiling scripts from other mods seem to work. Any ideas?
     
  2. Jordan

    Jordan It Wandered In From the Wastes

    106
    May 8, 2008
    Program int2ssl also not been able to decompile.

    Rather scripts were compiled ipp compiler.

    It should be in every script, insert the test.

    Code:
    procedure destroy_p_proc begin
    
    //LEATHER_ARMOR
    if (obj_art_fid(self_obj) == FID_HMLTHR) then add_obj_to_inven(self_obj, create_object_sid(PID_LEATHER_ARMOR, -1, -1, -1));
    //LEATHER_JACKET
    else if (obj_art_fid(self_obj) == FID_HMMAXX) then add_obj_to_inven(self_obj, create_object_sid(PID_LEATHER_JACKET, -1, -1, -1));
    
    And so on...
    
    end
    
    
    
     
  3. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    Int2ssl. May be even with -a switch.
     
  4. hakimio

    hakimio It Wandered In From the Wastes

    165
    Feb 27, 2009
    Didn't really get it. Were should I insert the code? You think the scripts in the mod were compiled with buggy ipp compiler? [you can just explain in RUSSIAN]

    Thanks for the link but even when using -a switch it just dumps empty file. Here is the output:
    Code:
    Loading file bcdarion.int...
      Read strtup code
      Read procedures table
      Read namespace
      Read stringspace
      Read tail of startup code
        Check "Jump to 'start' procedure" / "Jump to end of statup code"
        Check "# of argument to 'start' procedure"
        Extract "Export var" section
        Extract "Set exported var values" section
        Extract "Export procedures" section
        Extract "Global variables" section
      Read procedure's bodies
    Error: Invalid opcode at 0x00002f2c
     
  5. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    Either script was built with use of some Sfall-extended features or you just have a damaged int-file. In the first case Jordan's modified int2sll version could help you. In the second case the only thing you can do is to make opcode dump with -d switch and try to rewrite code correspondingly to the resulting listing.
     
  6. Jordan

    Jordan It Wandered In From the Wastes

    106
    May 8, 2008
    The problem in completing the script.

    I opened ecelron.int using winhex

    Code:
    00000000800D8019802A8029800C801C802A8029801C0000
    

    Normal scripts
    Code:
    00000000800D8019802A8029800C801C802A8029801C
    
    If you remove a 0000 script decompile


    ecelron.ssl

    Code:
    variable ProtoOfItemGiven;
    variable ValueOfRollCheck := 1;
    variable Scenery_Creation;
    variable Scenery_Creation_Hex;
    variable Scenery_Creation_Count;
    variable Temp_Scenery_Creation_Hex;
    variable Scenery_Creation_Ptr;
    variable How_Many_Party_Members_Are_Injured;
    variable How_Many_Party_Members_Armed;
    variable PartyHealingItem;
    
    procedure checkPartyMembersNearDoor;
    
    variable global_temp;
    variable dest_tile;
    variable step_tile;
    variable in_dialog;
    variable forced_node;
    variable restock_amt;
    variable restock_obj;
    variable restock_trash;
    variable removed_qty;
    
    procedure start;
    procedure talk_p_proc;
    procedure destroy_p_proc;
    procedure map_enter_p_proc;
    procedure description_p_proc;
    procedure look_at_p_proc;
    
    
    procedure checkPartyMembersNearDoor
    begin
    	if (party_member_obj(16777278) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777278)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777376) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777376)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777377) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777377)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777305) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777305)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777313) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777313)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777323) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777323)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777352) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777352)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777378) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777378)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777368) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777368)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777379) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777379)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777380) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777380)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777295) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777295)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777381) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777381)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777407) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777407)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777411) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777411)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777412) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777412)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777413) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777413)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777481) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777481)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777558) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777558)) <= 5) then begin
    			return 1;
    		end
    	end
    	if (party_member_obj(16777600) != 0) then begin
    		if (tile_distance_objs(self_obj, party_member_obj(16777600)) <= 5) then begin
    			return 1;
    		end
    	end
    	return 0;
    end
    
    procedure start
    begin
    end
    
    procedure talk_p_proc
    begin
    	float_msg(self_obj, message_str(766, random(101, 105)), 8);
    end
    
    procedure destroy_p_proc
    begin
    	variable LVar0 := 0;
    	LVar0 := create_object_sid(113, 0, 0, -1);
    	add_obj_to_inven(self_obj, LVar0);
    	if (cur_map_index == 94) then begin
    		set_map_var(1, map_var(1) - 1);
    	end
    	return 0;
    	LVar0 := 0;
    
    procedure map_enter_p_proc
    begin
    	critter_add_trait(self_obj, 1, 6, 177);
    	critter_add_trait(self_obj, 1, 5, 19);
    end
    
    procedure description_p_proc
    begin
    	script_overrides;
    	display_msg(message_str(766, 100));
    end
    
    procedure look_at_p_proc
    begin
    	script_overrides;
    	display_msg(message_str(766, 100));
    end
    
    
    
    [/quote]
     
  7. hakimio

    hakimio It Wandered In From the Wastes

    165
    Feb 27, 2009
    Thanks, removing the zeros seems to fix them.