Courseplay / courseplay

Courseplay for Farming Simulator 2019
http://courseplay.github.io/courseplay
GNU General Public License v3.0
954 stars 529 forks source link

Lua Error with tractors an specialization AllradV4 #238

Closed Jaguar95 closed 10 years ago

Jaguar95 commented 10 years ago

Hello, i hope my english is good enough.

Since yesterday i have an Error in my Log, when using CP 3.41.0223 an tractors with the specialization AllradV4.

The Error: Error: LUA running function 'mouseEvent' D:/Eigene Dokumente/My Games/FarmingSimulator2013/mods/ZZZ_Courseplay/settings.lua(111) : attempt to index field 'AllradOrigPosY' (a nil value)

Weh does it appear?

fsscreen_2013_11_24_09_50_41 fsscreen_2013_11_24_09_50_49 fsscreen_2013_11_24_09_50_57

I tried several Versions of CP since 3.41.0011, with every version the same error.

Only change before this error: I installed the Updates for UrsusAddon (2.0.0.0) and TitaniumAddOn (1.0.0.4).

Best regards

Patrick

JakobTischler commented 10 years ago

Can you post a link to the 4WD specilization, please? It seems to differ from the ones I wrote support for.


Edit: Ah, I think I found the error. Please try: In settings.lua, replace lines 111 and 112 with the following:

self.hudAllradONOverlay:setPosition(self.hudAllradONOverlay.x, self.cp.hud.AllradOrigPosY[2]);
self.hudAllradOFFOverlay:setPosition(self.hudAllradOFFOverlay.x, self.cp.hud.AllradOrigPosY[3]);

Effectively, change self.cp.AllradOrigPosY[2] and self.cp.AllradOrigPosY[3] to self.cp.hud.AllradOrigPosY[2] and self.cp.hud.AllradOrigPosY[3].

Jaguar95 commented 10 years ago

Don´t know a link. It is already installed in several tractors. One example is this Claas Axion: http://ls2013.info/claas-axion-850-hexa-shift-v-1-0/

The first few comments in this allradv4.lua:

-- AllradV4

-- Specialization for Allrad

-- V2 by modelleicher & Made by Case_IH_MxU135 | FIX and V4 by DragonLord2007/modhoster -- www.schwabenmodding.bplaced.net -- V4 MP Fähig!Modelleicher -- Hud Modhosterteam und borutcebulj

Is ist allowed to upload the lua an give you a link?

JakobTischler commented 10 years ago

Nevermind the the spec, as mentioned above I think I found the error. Please test my proposed solution and report.

Jaguar95 commented 10 years ago

Hello, ok, that´s it. Problem solved. Works perfect, no more errors.

Thank you for this quick solution.

Patrick