How can I use io to write to a file using a Gadget? Spring throws an error, says that it can't find the global 'io'... and I have something I need to write to a file via a Gadget.
i.e., file = io.open('myfilenamehere.txt', 'w+') doesn't work, in a Gadget.
Works in Widgets just fine, I've used it for a lot of stuff, it's very puzzling.
Can't do what I need to do in a Widget, though, it absolutely has to be a Gadget (unsynced doesn't matter).
IO and Gadgets?
Moderator: Moderators
Re: IO and Gadgets?
Looks like it uses the same BLOCK-EVERYTHING function for either half of gadgets.
But what in the world actually needs i/o? The end-user can change files at will; what's wrong with using a widget? People with luaui off?
But what in the world actually needs i/o? The end-user can change files at will; what's wrong with using a widget? People with luaui off?
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: IO and Gadgets?
I'm guessing its for security to make it a bit harder for someone to secretly write a bat file into "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
(tho imo widgets shouldn't beable to do this either!)
(tho imo widgets shouldn't beable to do this either!)
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: IO and Gadgets?
Oh damn it was last time I checked, it looks like it was fixed which is nice.. :)
Re: IO and Gadgets?
Meh, that's lame, this needs to get changed.
Re: IO and Gadgets?
??? How would you even synch the data in the gadget?
Probably what you'll have to do is write it as a widget, synch the data to all players (so every player has every other player's file data) and then run some sort of arbitration system to decide whose version gets priority.
Probably what you'll have to do is write it as a widget, synch the data to all players (so every player has every other player's file data) and then run some sort of arbitration system to decide whose version gets priority.
Why not? Security reasons? Personally, I like the idea that widgets can save and load their own widget-specific data.TheFatController wrote:(tho imo widgets shouldn't beable to do this either!)
Re: IO and Gadgets?
You'd have to do that with gadgets too, communicating from unsynced to synced.Pxtl wrote:Probably what you'll have to do is write it as a widget, synch the data to all players (so every player has every other player's file data) and then run some sort of arbitration system to decide whose version gets priority.
Shouldn't be able to escape the spring directory.Pxtl wrote:Why not? Security reasons? Personally, I like the idea that widgets can save and load their own widget-specific data.TheFatController wrote:(tho imo widgets shouldn't beable to do this either!)