Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround: 1.5 patch #447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

workaround: 1.5 patch #447

wants to merge 1 commit into from

Conversation

pvaiko
Copy link
Contributor

@pvaiko pvaiko commented Jan 30, 2025

Commented out the now missing aiSystem:getJobByIndex() we don't need it for anything critical, just cosmetics.

#433

Commented out the now missing aiSystem:getJobByIndex()
we don't need it for anything critical, just cosmetics.

#433
@pvaiko pvaiko requested review from Tensuko and schwiti6190 January 30, 2025 01:25
@pvaiko pvaiko self-assigned this Jan 30, 2025
@pvaiko pvaiko linked an issue Jan 30, 2025 that may be closed by this pull request
@NoName941238
Copy link

correct fix for Patch 1.5 should be:

-       local job = g_currentMission.aiSystem:getJobByIndex(index)
+       local job = g_currentMission.aiSystem.activeJobs[index]

@antonkapralov
Copy link

antonkapralov commented Jan 30, 2025

correct fix for Patch 1.5 should be:

-       local job = g_currentMission.aiSystem:getJobByIndex(index)
+       local job = g_currentMission.aiSystem.activeJobs[index]

This solution did't works for me. but this one does :

if self.updateTime < g_time then
for i = 1, self.activeWorkerList:getItemCount() do
local element = self.activeWorkerList:getElementAtSectionIndex(1, i)
local job = g_currentMission.aiSystem:getActiveJobs()[i] -- Get the job
if job ~= nil then
element:getAttribute("text"):setText(job.name) -- Use the correct property
end
end
self.updateTime = g_time + 1000
local vehicle = self.cpMenu:getCurrentVehicle()
end

I have manually edited the Lua file CpCourseGeneratorFrame and now there are no more errors in log files

@Maestro-Ralf
Copy link

correct fix for Patch 1.5 should be:

-       local job = g_currentMission.aiSystem:getJobByIndex(index)
+       local job = g_currentMission.aiSystem.activeJobs[index]

This solution did't works for me. but this one does :

if self.updateTime < g_time then for i = 1, self.activeWorkerList:getItemCount() do local element = self.activeWorkerList:getElementAtSectionIndex(1, i) local job = g_currentMission.aiSystem:getActiveJobs()[i] -- Get the job if job ~= nil then element:getAttribute("text"):setText(job.name) -- Use the correct property end end self.updateTime = g_time + 1000 local vehicle = self.cpMenu:getCurrentVehicle() end

I have manually edited the Lua file CpCourseGeneratorFrame and now there are no more errors in log files

I checked, your version was working, the error disappeared. Thank you. Attach the file, maybe it will be useful to people, as a temporary solution.

@antonkapralov
Copy link

correct fix for Patch 1.5 should be:

-       local job = g_currentMission.aiSystem:getJobByIndex(index)
+       local job = g_currentMission.aiSystem.activeJobs[index]

This solution did't works for me. but this one does :
if self.updateTime < g_time then for i = 1, self.activeWorkerList:getItemCount() do local element = self.activeWorkerList:getElementAtSectionIndex(1, i) local job = g_currentMission.aiSystem:getActiveJobs()[i] -- Get the job if job ~= nil then element:getAttribute("text"):setText(job.name) -- Use the correct property end end self.updateTime = g_time + 1000 local vehicle = self.cpMenu:getCurrentVehicle() end
I have manually edited the Lua file CpCourseGeneratorFrame and now there are no more errors in log files

I checked, your version was working, the error disappeared. Thank you. Attach the file, maybe it will be useful to people, as a temporary solution.

Done!
I have added the CpCourseGeneratorFrame file. Just open the archive and add the file to your mod:

Place it in: \FarmingSimulator2025\mods

The file goes into: FS25_Courseplay.zip\scripts\gui\pages

I’m glad my solution worked for you! 😊

CpCourseGeneratorFrame.zip

@maurice825
Copy link

Worked for my loading error aswell! Issue #438

@Roby1164
Copy link
Contributor

correct fix for Patch 1.5 should be:

-       local job = g_currentMission.aiSystem:getJobByIndex(index)
+       local job = g_currentMission.aiSystem.activeJobs[index]

This solution did't works for me. but this one does :
if self.updateTime < g_time then for i = 1, self.activeWorkerList:getItemCount() do local element = self.activeWorkerList:getElementAtSectionIndex(1, i) local job = g_currentMission.aiSystem:getActiveJobs()[i] -- Get the job if job ~= nil then element:getAttribute("text"):setText(job.name) -- Use the correct property end end self.updateTime = g_time + 1000 local vehicle = self.cpMenu:getCurrentVehicle() end
I have manually edited the Lua file CpCourseGeneratorFrame and now there are no more errors in log files

I checked, your version was working, the error disappeared. Thank you. Attach the file, maybe it will be useful to people, as a temporary solution.

Done! I have added the CpCourseGeneratorFrame file. Just open the archive and add the file to your mod:

Place it in: \FarmingSimulator2025\mods

The file goes into: FS25_Courseplay.zip\scripts\gui\pages

I’m glad my solution worked for you! 😊

CpCourseGeneratorFrame.zip

It seems this mod works... Great

@pvaiko
Copy link
Contributor Author

pvaiko commented Jan 30, 2025

For the record, none of the above is a correct fix, all are just workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FS25 patch 1.5 - LUA Error
6 participants