Hi all..
First of all thanks for the hard work creating CP script till now, here i had a problem with Version 00357 that can't generate course from recorded course for AD,in previous version 00350 this script still working, you can see on the attached picture
this the Log for version 00357
2020-01-02 21:25 ## Courseplay: loading courses and folders from "courseManager.xml"
2020-01-02 21:25 ## Skip loading courses not assigned to any vehicle to speed up start time.
2020-01-02 21:25 :19 [dbg7 lp24030] 724 Vario: hasGeneratedCourse=false, hasEnoughWaypoints=false, hasStartingCorner=false, hasStartingDirection=false, numCourses=0, fieldEdge.selectedField.fieldNum=0 ==> hasValidCourseGenerationData=false
2020-01-02 21:25 :19 [info lp24030] 724 Vario: There is no course with id=10166, not loading course for this vehicle
20
Thanks...


@russbeuker could this be a side effect of your changes for the course editor?
@pvaiko I will take a look at this.
@pvaiko Indeed it was a side effect of course editor code changes to course_management in function courseplay:loadSortedCourse(vehicle, index).
The call I added 'courseplay:reloadCoursesFromXML(vehicle)' is meant to force a reload of the individual course xml's to ensure that an edited course that was saved is reloaded when loading course, instead of using the internal cached copy. This call was a pretty blunt instrument in that it forced all course .xml's to reload, which if you didn't have load courses on startup activated, would take a long time (20 seconds on my pretty fast dev box). So the solution/workaround may be:
1) remove that call from that function. Good: Loading a course will be faster and the error encountered while loading an autodrive course goes away. I'm still trying to understand autodrive as today is the first time I have used it. Bad: If you edit a course A, then save it, then load course B, then clear course B and load course A, it will look like course B, and this is wrong. The solution is for the user to click the reload courses icon on the HUD, then load course A. Since it is early on in the course editor's existence as a CP tool, this may be just a trainable thing with some documentation/hints/tips.
or
2) modify the call so that passes the courseid so that the subsequent calls will reload only that course. I'm experimenting with this now. It is going to take a bit to figure it out, perhaps an extra pot of coffee or two.
So, in summary, there is no current workaround for the autodrive error, but we are working on it.
Cheers,
Russ
Thanks Russ for the explanation, so i think before this issue clear i will use version 0050 for reload my course from AD then save them as the CP Course after that, remove the V0050 and replace with V0057 and continue playing..
Cheers...
@russbeuker thanks for looking into it, that course management legacy code is not the cleanest...
Shoot me an email to [email protected] I have some tips to make development easier in case you haven't discovered them.
This is issue is fixed in 00358.
Thank you @russbeuker