Mayumi Posted December 1, 2020 Share Posted December 1, 2020 Have you ever come back to a working board and opened the LUA interface, just to find it completely empty? I already made a ticket and all, I'm just interested in hearing if anyone else has run in to this issue. And maybe if someone has, is there some way to avoid it in the future? What causes it? I wish there was an easy way to work the boards with local files like the seat autoconf, since after this debacle I'm afraid of doing any work on the board itself, if it happened once, why wouldn't it happen again. No way to do automatic backups in-game. Especially when I had a backup board, but it got wiped as well, so I guess it was something to do with the code itself. Link to comment Share on other sites More sharing options...
Utlaen Posted December 1, 2020 Share Posted December 1, 2020 You can do a blueprint of whatever construct you building as backup, it saves all the element properties. Link to comment Share on other sites More sharing options...
GraXXoR Posted December 2, 2020 Share Posted December 2, 2020 I often right click and export the config to clipboard. And I have an open source windows clipboard manager running in the background that saves clipboard history...so that way, I can roll back my board’s previous code if things go south. Link to comment Share on other sites More sharing options...
Mayumi Posted December 2, 2020 Author Share Posted December 2, 2020 4 hours ago, GraXXoR said: I often right click and export the config to clipboard. And I have an open source windows clipboard manager running in the background that saves clipboard history...so that way, I can roll back my board’s previous code if things go south. I did this for a while, but then I accidentally clicked paste config instead of copy.. Maybe if I got in to the habit of doing it really often it wouldn't be a big deal ? I'll have to take a look at the clipboard manager, also found out win10 has it's own (win + v), not sure if it's as good though. Link to comment Share on other sites More sharing options...
Bobbie Posted December 2, 2020 Share Posted December 2, 2020 . Mayumi 1 Link to comment Share on other sites More sharing options...
Mayumi Posted December 7, 2020 Author Share Posted December 7, 2020 On 12/2/2020 at 2:44 PM, Bobbie said: There is, you can use require() to load local files I've been playing with this and the two showstoppers seem to be 1) No error reporting 2) No access to unit or system from within the local script Maybe I'm doing something wrong and these can be remedied, but I couldn't figure it out. Link to comment Share on other sites More sharing options...
Bobbie Posted December 7, 2020 Share Posted December 7, 2020 . Link to comment Share on other sites More sharing options...
Mayumi Posted December 9, 2020 Author Share Posted December 9, 2020 On 12/7/2020 at 7:02 PM, Bobbie said: It's been a while for me, I don't remember exactly how DU sets all the variables. But what I always did is collect everything I need into a table, and pass it on to my actual script during initialization (which I do in unit.start). You can use xpcall to catch and report errors any way you like. You'll find examples of this in the code emitted by hdparm's wrap.lua. That's another area where DU is the last thing you'd want to depend on for your sanity... ? Thanks for all the tips! LUA is new to me so it's been a learning process, with all the DU quirks added and documentation a bit lacking, not the easiest thing. Maybe with a global table and xpcall I'll get it working like I want, I'll try this in the next project, refactoring the current one would be a lot of work. I'm using a clipboard manager now so at least the whole thing won't be erased if the board happens to reset again. Link to comment Share on other sites More sharing options...
Bobbie Posted December 9, 2020 Share Posted December 9, 2020 . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now