Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#139020   2018-03-17 03:56          
gorgoil:
doesn't says any line
believe it or not I myself saw that too...

The raceBot.enterCar(raceBot.car); is the line producing the Mighty Error because the Bot.world variable is null.
we need to set that to the map of the track you are putting this script into like:
Bot raceBot = new Bot( 0, 1, 1, 2.0, 2.0, 1.0);
player.controller.command( "leave " + player.car.id() );
raceBot.car = player.car;
raceBot.world = map;
raceBot.enterCar(raceBot.car);
raceBot.brain.command( "AI_BeginRace 1.0" );
raceBot.followSplineTrack( SplineWidth, "maps\\RaceSpl\\temp_spl_"+bot_i+".spl", 0 );

Though if it didnt work for you before it wont now either I just got the mighty error(I just didnt check the error.log) and the car behaved as intended.

I also solved the last crash point(last at my end at least) in SlrrExhaustive, the one caused by the followSplineTrack, it was actually just the game opening the given spl file with no read-sharing and failing to close the file before the next iteration tried to open the same file again for another bot to follow, now in the Tournaments the bots copy the given spl for themselves with a unique name and reference that, this seems to work.
I updated the patch link.
(SlrrExhaustive Patch Link)