Community Forum

Lexion script problem :S

Forum Overview >> Farming Simulator 2011

CategoryFarming Simulator 2011
Created30.08.2011 22:51


Surci Modding (surciHUN) 30.08.2011 22:53
Hi! What's the problem in the script?
in log: Lua: Error running function: update
C:/Users/surciHUN/Documents/My Games/FarmingSimulator2011/mods/aalexi/lexion480.lua(1763) : attempt to perform arithmetic on field 'literPerQm' (a nil value)

In the script:
-- 8000/1200 = 6.66 liter/meter
-- 8000/1200 / 6 = 1.111 liter/m^2
-- 8000/1200 / 6 / 2^2 = 0.277777 liter / density pixel (density is 4096^2, on a area of 2048m^2
local pixelToQm = 2048 / 4096 * 2048 / 4096 / g_currentMission.maxFruitValue; -- 4096px are mapped to 2048m
local literPerQm = 1;
local multipli = 1;
if (fruitType ~= FruitUtil.FRUITTYPE_UNKNOWN) then
literPerQm = FruitUtil.fruitIndexToDesc[fruitType].literPerQm * (1 + 0.5 * (3 - g_currentMission.missionStats.difficulty));
end;
--local literPerPixel = 8000/1200 / 6 / (2*2);

--literPerPixel = literPerPixel*1.5;
local qm = lastArea*pixelToQm;

local newFillLevel = self.grainTankFillLevel+qm*literPerQm*self.threshingScale;
self:setGrainTankFillLevel(newFillLevel, fruitType);

else
self.percent = 0;
end;

I'm converted 09 to 11 :
But I start Treshing freez my game... stop Treshing no problem :S

http://www.abload.de/img/lsscreen_2011_08_30_20pkgp.png


Torsten Lange (skydancer) 01.09.2011 15:29
http://gdn.giants-software.com/thread.php?categoryId=16&threadId=536

Surci Modding (surciHUN) 04.09.2011 17:32
Thanks, but is not good :S


Note: Log in to post. Create a new account here.