-
Notifications
You must be signed in to change notification settings - Fork 274
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
Landing pads #428
Landing pads #428
Conversation
If someone know how to debug the lua code or have more info about the exception, I'm searching for info :D I'll investigate more tonigth |
if(furniture.GetParameter("smelttime") >= furniture.GetParameter("smelttime_required")) then | ||
furniture.SetParameter("smelttime", 0) | ||
|
||
--[[ outputSpot = World.current.GetTileAt(spawnSpot.X+2, spawnSpot.y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented code?
Can't we delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and shouldnt it be "tradetime" and "tradetime_required"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's WIP code, I'm trying to figure out where the nil exception comes from by commenting code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@relinu yes that must be my nil exception, I was watching the rest! That's why I shared it, a second eye is priceless! Thanks a lot, I'll try to fix it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no :( I still get the issue, even while commenting more lua code
ScriptRuntimeException: attempt to index a nil value
MoonSharp.Interpreter.Execution.VM.Processor.ExecIndex (MoonSharp.Interpreter.Execution.VM.Instruction i, Int32 instructionPtr)
MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop (Int32 instructionPtr)
I'll add a check in the parameter get/change in c# to throw a proper log in that case, but I may have to pause a few hours first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboigelot can you update the code here to the "newest" version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem seems to be on this line:
function LandingPad_Temp_JobComplete(j)
spawnSpot = j.tile.furniture.GetSpawnSpotTile()
no idea why for now
edit
hem of course, there is no furniture at the spawnSpotTile as I modify it earlier in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboigelot I suggest avoiding in progress PRs. People will test out your code when you're not finished yet, losing time.
Great work though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's th next line: World.current.GetTileAt(jobSpot.X, jobSpot.y (! needs to be Y) -1)
and in the commented sections you have several other GetParameter calls that have wrong parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboigelot I suggest avoiding in progress PRs. People will test out your code when you're not finished yet, losing time.
I tend to agree, but here the help was really great. I would have lot much more time without all the other coders.
The feature is ready! |
Is that s in comic sans?😂 |
@bjubes indeed :D you have the eye! |
Awesome! |
* Auto font license edition * Small landing pad - lua crash * Fixing lua code
* Auto font license edition * Small landing pad - lua crash * Fixing lua code
A small landing pad for trading.
The landing pad currently allow to trade steel for steel, with a small profit, at the cost of work time.
The behaviour is a temporary behaviour to be expanded with futher trade system.