Category | Farming Simulator 2009 |
Created | 10.07.2009 21:29 |
Claudio Accotardi (Unknown) | 10.07.2009 21:35 |
---|---|
Hi, I have install a mod, this are the error into console first, don't appear the pricipal menu: [string "dataS/scripts/main.lua"]: 291 attempt call method KeyEvent (a nil value) [string "dataS/scripts/main.lua"]: 311 attempt call method update (a nil value) [string "dataS/scripts/main.lua"]: 326 attempt call method render (a nil value) That I can find into script lua for resolve this problem? Lost a variables o what? Thanks in advance Best regards |
Michael Pillkahn (Unknown) | 11.07.2009 01:07 |
---|---|
the problem is not in main.lua you have an error in your script, but what have you add/change, find step by step, i think nearly :keyevent or in :update |
Claudio Accotardi (Unknown) | 11.07.2009 09:24 |
---|---|
Thanks, Best regards Hi, I have comment all row into functions of my file lua, but I have still the error. It's possible what the error is into modDesc.xml or into file i3d? Thanks in advance Best regards Hi, If I remove into modDesc.xml the line seven: <specializations> <specialization name="mylua" className="mylua" filename="mylua.lua"/> </specializations> <vehicleTypes> <type name="mylua" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua"> <specialization name="attachable" /> <specialization name="trailer" /> <specialization name="mylua" /> lin what I have removed </type> </vehicleTypes> the game run and register my type. I don't understud what I mistake. Thanks in advance Best regards. |
Michael Pillkahn (Unknown) | 12.07.2009 02:19 |
---|---|
mylua is very very poor to have overview: moddesc.xml: <specialization name="myluascript" className="myluaclass" filename="myluafile.lua"/> .. <type name="myvehicle" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua"> .. <specialization name="myluascript" /> .. myvehicle.xml: .. <vehicle type="myvehicle"> .. an on myluafile.lua: myluaclass = {}; and every function begins with function myluaclass: end end after the : with prerequisitesPresent, load, update, draw, keyevent, mousevent etc... |
Claudio Accotardi (Unknown) | 12.07.2009 11:21 |
---|---|
Hi Mr. Pillkahn, I try immediately. Thanks Best Regards Thanks Mr. Pillkahn, now the game run but unfortunatly I have anoter problen, I don't see the mod into the store. Hi The error of console when I see the menu is: Error: unsupported description version in mod nameofmymod There is a file what descript the syntax of file modDesc.xml how file i3d? Thanks in advance Best regards I have find the error of mod but I have still error with main.lua. I am disheartened. Thanks at all for support. Best regards |
Michael Pillkahn (Unknown) | 12.07.2009 15:12 |
---|---|
the best way you to see what and where you need anithing is taking a running mod and show what they wrote. for store you find two entry in moddesc.xml the first <storeItems> is the high group but you must say your vehicle in <storeItem> and end with </storeItem> when you give the value <image you have save this imagefile in your mod. the question with lua, is saved in myvehicle.xml with <filename>myi3dfile.i3d</filename> |
Claudio Accotardi (Unknown) | 12.07.2009 18:59 |
---|---|
Hi I have write how you are suggest me. If I delete in modDesc, into tag <type......, this line <specialization name="myluascript" /> I don't have error into console. Into myluafile I have write this: myluaclass = {}; function myluaclass:prerequisitesPresent(specializations) return SpecializationUtil.hasSpecialization(Trailer, specializations); end; function myluaclass:load(xmlFile) print("myluaclass:load(xmlFile)"); end; function myluaclass:delete() print("myluaclass:delete()"); end; function myluaclass:mouseEvent(posX, posY, isDown, isUp, button) print("myluaclassmouseEvent(posX, posY, isDown, isUp, button)"); end; function myluaclass:keyEvent(unicode, sym, modifier, isDown) print("myluaclass:keyEvent(unicode, sym, modifier, isDown)"); end; function myluaclass:update(dt) print("myluaclass:update(dt)"); end; function myluaclass:draw() print("myluaclass:draw()"); end; It's possible that function print are incorrect? Thanks Best regards |
Note: Log in to post. Create a new account here.