OK I have run into a problem.
I tested it just for England and the ships don't have names at all. Here is my code and the error log:
Code:
#include "SHIPS/ships.h"
...
int i = GetShipByType(); //from ships.h
...
if((i >= 0 && i < 2) || (i >= 8 && i <= 11) || i == 12 || i == 17){
n = AddStr2Array(&sRndShpEnName, n, "Trader")
} else if((i >= 3 && i <= 4) || i == 7 || i == 14 || i == 16){
n = AddStr2Array(&sRndShpEnName, n, "Trader, Warship")
} else if(i == 6 || i == 7 || i == 13 || i == 15 || (i >= 18 && i <= 25)) {
n = AddStr2Array(&sRndShpEnName, n, "Warship")
}
Error.log:
COMPILE ERROR - file: SHIPS/ships.h; line: 1
define redefinition: SAILS_COLOR_QUANTITY
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 19
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 35
Invalid string argument
RUNTIME ERROR - file: utils.c; line: 39
Invalid string argument
Note: error log wasn't showing up (except for battle-interface errors which have no impact) before this change occurred in ships_name.c
This is the function I want to use from ships.h:
ref GetShipByType(int iType) { return &ShipsTypes[iType]; }
EDIT: I already know the problem. It needs an int argument which I cannot provide. I was thinking that the game could make the determination for itself based on the new ships generated, but I am wrong obviously...