• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Problem Developing New Mod

Modder01

Freebooter
Storm Modder
I am having a problem developing my new AOP:CT mod.

First in Ships_init.c there is a bug in line 969 at the makearef portion.

After I deleted what was originally on 969, a new brig for the mod. Still I get the runtime error and if I look in system.txt it says:
"User Rised Exception .\Sources\ifs.cpp line 856 buffer size too small"

Need help in increasing the buffer size so the game may run. It seems that the content is not the problem, its the coding.

The Parts of the Mod That Work:
Sounds/Music
Cannon Mod
ships_init.c (without the brig on 969)
ships.h
battleinterface.c
pictures.ini
sound_alias.ini
music_alias.ini
videos for the 2.5 alpha test

I added the program files one at a time to see which files cause the runtime error.
Causes Runtime Error:
common.ini (found a space in between the comma and quotes. fixed but still having problems)


Link to Thread containing my mod:
http://www.piratesahoy.net/threads/hello-guys-and-aop-mod-wip.21792/
 
Last edited:
Are you using error logging? What exactly does it complain about? Can you post the ships_init.c file for reference as well?
 
Thanks for replying Pieter, the error log says nothing about the problem but the system.txt does. It says the following when I have all the modded files with the updated common.ini:

User Rised Exception .\Sources\ifs.cpp (is this common.ini?) line 856 buffer size too small.

Without the updated common.ini I get this in error log:

FULL ERROR LOG:
Code:
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 646
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 646
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 647
missed attribute: price
RUNTIME ERROR - file: scripts\rangers.c; line: 647
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 79
missed attribute: weight
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 79
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 80
missed attribute: capacity
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 80
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 81
missed attribute: maxcrew
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 81
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 82
missed attribute: mincrew
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 82
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 83
missed attribute: speedrate
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 83
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 84
missed attribute: turnrate
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 84
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 85
missed attribute: hp
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 85
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
missed attribute: name
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
missed attribute: name
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 573
missed attribute: class
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 573
no rAP data
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1447
missed attribute: sp
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1447
no rAP data
RUNTIME ERROR - file: characters\characterUtilite.c; line: 373
missed attribute: class
RUNTIME ERROR - file: characters\characterUtilite.c; line: 373
no rAP data
RUNTIME ERROR - file: scripts\rangers.c; line: 634
missed attribute: class
RUNTIME ERROR - file: scripts\rangers.c; line: 634
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'begin_storyline_continue' not found
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'QuestComplete' stack error
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'get map 1' not found
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'QuestComplete' stack error
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'rank8 check' not found
RUNTIME ERROR - file: quests\quests_reaction.c; line: 22
function 'QuestComplete' stack error
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 79
missed attribute: weight
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 79
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 80
missed attribute: capacity
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 80
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 81
missed attribute: maxcrew
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 81
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 82
missed attribute: mincrew
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 82
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 83
missed attribute: speedrate
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 83
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 84
missed attribute: turnrate
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 84
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 85
missed attribute: hp
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 85
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
missed attribute: name
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
no rAP data
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
missed attribute: name
RUNTIME ERROR - file: scripts\ShipsUtilites.c; line: 91
no rAP data
RUNTIME ERROR - file: interface\utilite.c; line: 519
missed attribute: name
RUNTIME ERROR - file: interface\utilite.c; line: 519
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 846
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 846
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 846
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 846
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 846
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 846
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
missed attribute: class
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
missed attribute: class
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2768
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
missed attribute: class
RUNTIME ERROR - file: interface\shipyard.c; line: 2771
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
missed attribute: sp
RUNTIME ERROR - file: interface\shipyard.c; line: 2777
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
missed attribute: cannonsquantity
RUNTIME ERROR - file: interface\shipyard.c; line: 2780
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2801
no rAP data
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
missed attribute: name
RUNTIME ERROR - file: interface\shipyard.c; line: 2820
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data
RUNTIME ERROR - file: scripts\utils.c; line: 624
missed attribute: class
RUNTIME ERROR - file: scripts\utils.c; line: 624
no rAP data

The Shipyard interface was missing ships_init.c data from one ship (probably the mod ship I deleted at line 969 of ships_init.c to fix the other problem), but the rest worked. Some of the pictures were correctly displayed (2-4 pictures) while the rest never came up.
The game stops working with a runtime error when I enter 3rd person sea mode from Bridgetown with the AOP unmodifed Lugger that I get as the first ship in the game. Error and system log record a runtime critical stop but cannot tell what the problem is.

I have removed the Ship files (Ships_init.c, Ships.h, Battle_interface.c, pictures.ini, common.ini) from the Mod Content Folder in the beta mod archive to the Debug Folder linked on the thread that I linked in this thread. I set up a temporary ships_init.c that allows the game to work with the modified stats without any problem.

If you didn't understand what I just said about the link here is a direct link to the Beta version of my modified files for testing. Includes the debug folder containing the "bad" files.
https://www.dropbox.com/sh/18wk60fd8tzx0v3/wiunwdo87K
 
Last edited:
I don't have time to check this in-depth at the moment, but I suspect a typo somewhere in your modified ships_init.c file.
That might make the game err out on one of the ships, resulting in it not having any attributes.
Recommend using WinMerge on the working and modified version of the file, then moving your changes back in bit by bit.
 
I don't have time to check this in-depth at the moment, but I suspect a typo somewhere in your modified ships_init.c file.
That might make the game err out on one of the ships, resulting in it not having any attributes.
Recommend using WinMerge on the working and modified version of the file, then moving your changes back in bit by bit.

First of all I found out why the one ship has no data. it was the ship I removed to correct a linking problem in ships_init.c at the first #refship that connects the Ship_init values to the models/textures.

Unfortunately I do not have win merge and I run the game on windows 8.1 so it would be highly unlikely that win merge would work. I do have Notepad++ :)
 
Last edited:
WinMerge works fine for me on Win8.1. :onya
 
Why would WinMerge not work? You can get the latest version for free from the Internet.
 
Back
Top