Put the attached file into the "PROGRAM" folder of your game installation. If you paste it into the correct place, Windows should ask if you want to overwrite a file because there's already "PROGRAM\console.c".
Run the game. Next time you see the "error" messages in the inventory, close the inventory and interface screen, get back to the main view, then press F12. And then post "compile.log" here.
Which leads neatly onto...
Where are they located exactly? I looked over my Program Files folder for this game, can't find it. Also, nope, F11 didn't seem to work.
Nothing should be in "Program Files". If you installed the game into "Program Files" or "Program Files (x86)", or any sub-folder of either of those, you're going to run into various problems, though I don't think the inventory is one of them. My own installation is in "C:\Games\Pirates of the Caribbean".
In any case, wherever you installed the game, that is where you should find the log files. There should be "PROGRAM" and "RESOURCE" folders, as well as some files. The log files are among those files, not in the "PROGRAM" or "RESOURCE" folders.
And the only other thing I can think of that might have been the cause, was when I skipped from one end of the inventory to the other. I didn't click on the arrow, I clicked on the next image, and at one point I visited the crypt, had a BUNCH of treasure, and I mashed it. Maybe that was the cause, because a few times, the square that lands on the middle item went ahead of all the items left and landed on literally on the empty space after the last item.
Like
@The Nameless Pirate, I do this as well because it scrolls through the inventory more quickly than clicking on the arrows. The square can indeed land one position past the last real item.
If you have been changing options such as "Weapon Qualities" or "Ammunition and Powder" during a game, that may do silly things to the inventory.