Change that to:
Code:
if(findSubStr("xyzzy", "yz", 0) != -1) trace("findSubStr works");
It will probably still complain, but hopefully it will complain about a different line number.
The problem is that function "HasSubStr" doesn't seem to exist in CoAS either. The definition in PoTC is just a single line. The above code has simply replaced the call on "HasSubStr" with a call on "findSubStr", which had better exist otherwise this is going to be very difficult...
SO I launched the game. the game works, but once I am aboard on Dutchman it begins to freeze for 1 second, then unfreeze for 2 secs. that goes in a loop.
Now I got this error.log
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3338
function 'findSubStr' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
missed attribute: correctimmersion
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3348
no rAP data
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
Invalid string argument
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 3350
function 'findSubStr' stack error