• 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!

A couple of errors

Takeda-One

Prussian Corsair
Storm Modder
Hey folks, I have some malefunctions when I try to start the game with new ships and need to know the meaning of some errormessages. Is there some who can help?

system.log:

WARNING! Can`t model class pointer for ShipModel
WARNING!!! Missing INIT message to ROPE - bad ship model
Missing INIT message to FLAG: bad MODEL

examples from error.log :

COMPILE ERROR - file: no debug information; line: 1576
No matching ')' in expression
COMPILE ERROR - file: no debug information; line: 1576
Invalid Expression

or:

COMPILE ERROR - file: no debug information; line: 1
Invalid Expression

or:

RUNTIME ERROR - file: no debug information; line: 1
missed attribute: track
RUNTIME ERROR - file: no debug information; line: 1
null ap
RUNTIME ERROR - file: no debug information; line: 1
no rAP data

Whats wrong and which file is meant??
 
These errors seemed to be caused by me ship.init- file but I didn't change enough to cause trouble...
 
These errors seemed to be caused by me ship.init- file but I didn't change enough to cause trouble...

Sounds like a minor typo, such as a missing ')' or ';' is breaking the file. But without seeing it that's just a guess.


Jonathan A.
 
I've loaded the files up to my last reply in the new ships and character topic...

Hi Takeda,

Can you check or upload your Cannons.h file?
In my copy, the lines for the 8 pounders are commented out, so refShip.Cannon = CANNON_TYPE_CANNON_LBS8; would fail.

Also, you've got the black pearl with: refShip.Cannon = CANNON_TYPE_CANNON_LBS26; which are not a valid cannon type.

Cheers,

JA
 
Here it comes...

Ok, it has the 8 pound cannon line commented out.
Code:
//#define CANNON_TYPE_CANNON_LBS8	4
So, it's definitely not going to work. I've re-enabled all the 8 lbs cannon info in the attached mod.

Also, I fixed the "CANNON_TYPE_CANNON_LBS26" line in the "Ships_init.c" file, and it seems to work. There's bugs in the new AIFantom file, but I'll let you fix em.

Cheers,

JA
 

Attachments

  • Cannons8lbs.zip
    2.9 KB · Views: 103
  • Ships_init.c
    154.8 KB · Views: 133
Thanks, mate!

I would be no problem for me to fix those AIFantom bugs, but I don't know where the bugs are and what I schould write to fix them :shrug
 
Thanks, mate!

I would be no problem for me to fix those AIFantom bugs, but I don't know where the bugs are and what I schould write to fix them :shrug

Make sure you have error logging on.
Then after trying to run the game, check error.log to locate the bug

I saw two errors:
on line 465 you have RandFromFiveDight(SHIP_CARAVEL, SHIP_BARQUE, SHIP_BARKENTINE, SHIP_GALEON_L);
you need 5 ships in there, you've only got 4. Add a fifth ship, or put one of the four in twice.

I don't think there is a RandFromFourDight(), so you can't use that, and it won't work there on line 481 either.

There might be others, but that's all I saw in my quick look.
 
I corrected everything and now I got a new error message:

COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Undeclared identifier: RandFromFiveDight

But the ATFantom file has only about 5?? lines and due to the org file it most be a valid expreession
I am getting frustrated...
 
I corrected everything and now I got a new error message:
...
COMPILE ERROR - file: no debug information; line: 1071
Invalid Expression
COMPILE ERROR - file: no debug information; line: 1071
Undeclared identifier: RandFromFiveDight

But the ATFantom file has only about 5?? lines and due to the org file it most be a valid expreession
I am getting frustrated...

Given that last error line, I'd check that all calls to RandFromFiveDight(X,X,X,X,X) have valid ship codes in them, as it sounds like an invalid parameter is being passed.

Upload your file and I'll have a look if you like.


Cheers,

Jonathan A.
 
In one of those lines a "ShipType =" expression was missing, but after I matched it, the same error occured.

Appart from this mess, my ship mod does not seem to work anyway, due to one or more damaged models, thats what the system log says...
 

Attachments

  • AIFantom.c
    17.5 KB · Views: 125
In one of those lines a "ShipType =" expression was missing, but after I matched it, the same error occured.

Appart from this mess, my ship mod does not seem to work anyway, due to one or more damaged models, thats what the system log says...

Hi Takeda,

Ok, found the bugs in this at least. You had SHIP-GALEON_L instead of SHIP_GALEON_L.
And while "RandFromThreeDight" was defined in program/utils.c, there was no RandFromFiveDight.

So I've added a routine for RandFromFiveDight at the bottom of the AIFantom.c file, so it looks like it works now. (If you want to be neat, I'd move the RandFromFiveDight from the bottom of this file and put it at the bottom of program/utils.c with the existing RandFromThreeDight function)


Here's the fixed file:
View attachment AIFantom.c


Cheers,

JA.
 
Back
Top