Page 2 of 2

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Sat Jul 19, 2014 17:16
by Topywo
ExeterDad wrote:Just hoping someone has a copy of this mod laying around somewhere? Anyone?


Found this one. I didn't check it

https://dl.dropboxusercontent.com/u/65428713/mint.zip

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Sat Jul 19, 2014 18:10
by ExeterDad
Topywo wrote:
ExeterDad wrote:Just hoping someone has a copy of this mod laying around somewhere? Anyone?


Found this one. I didn't check it

https://dl.dropboxusercontent.com/u/65428713/mint.zip

I've never seen the original mod to determine if it's been modified or not, but it sure looks like the code snippets in this thread, and seems it will do as the OP advertised!
Thanks so much!

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Sat Jul 19, 2014 18:49
by kaeza
Topywo wrote:
ExeterDad wrote:Just hoping someone has a copy of this mod laying around somewhere? Anyone?


Found this one. I didn't check it

https://dl.dropboxusercontent.com/u/65428713/mint.zip

Package attached to first post. Thanks for the link!

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Mon Jul 21, 2014 05:09
by lightonflux
Can you add the license for code, textures and sounds in the archive please? A file called LICENSE would work well.

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Fri Jul 25, 2014 12:46
by aldobr
Yes ! Thats my code !

Thanks !

This cold is a little older than the last version, it still works with mese.

So i believe this has the strange operator precedence bug that allows players other than the machine owner to move stuff in the machine, pls check this (i cant because i dont know how to mimmick "other player" here).

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Fri Jul 25, 2014 15:59
by ExeterDad
Glad to see you are back in business!

Re: [mod] mint & automatic commerce machines [mint]

PostPosted: Fri Jul 25, 2014 16:59
by aldobr
Everything was updated, even the code. But i need some testers to verify safety.

Licence is still WTFPL for the code. Some images have their own free licences. Sounds are free from a free sounds site.

Re: [mod] mint & automatic commerce machines (Updated) [mint

PostPosted: Wed Aug 06, 2014 04:42
by aldobr
*bump it pls*

Re: [mod] mint & automatic commerce machines (Updated) [mint

PostPosted: Wed Aug 06, 2014 11:11
by Topywo
- (Tried with singleplayer and then topywo on a server) I couldn't change the price of the goods to sell, but had full access to the machine's inventory (so I could swap items)
- For crafting the machines it might be better to use group:wood instead of default:wood

Re: [mod] mint & automatic commerce machines (Updated) [mint

PostPosted: Wed Aug 06, 2014 14:20
by aldobr
The problem with setting price/fields is because you cannot leave a formspec by pressing enter. This is a minetest bug, not mod bug. Set the price (or item) field and click on something else at the inventory. Then press enter. Its annoying.

Edit: Fixed the ownership bug. For lua, "not a = b" is like "(not a) = b" instead of "not (a = b)". So i used "a ~= b", and i should have used this right from the start.

Re: [Mod] Mint & Automatic Commerce Machines [mint]

PostPosted: Sat Aug 09, 2014 01:09
by aldobr
Change 1.3, added a bank system to the mod. But i am still figuring out why it doesnt work.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   accountexists = function(machine, account)
      -- Return true if the account account exists
      print('checking for account '..account..' '..machine.accounts.getn)
      for name, value in pairs(machine.accounts) do
         print(name, '=', value)
         if name == account then
            return true
         end
      end
      return false
      -- return machine.accounts[account] ~= nil
   end,


This function is not working. Accounts is a table with key = playername and value = ammount of coins.

It doesnot work upon startup.

Re: [Mod] Mint & Automatic Commerce Machines [mint]

PostPosted: Fri Sep 12, 2014 23:40
by aldobr
Bump

Re: [Mod] Mint & Automatic Commerce Machines [mint]

PostPosted: Wed Oct 01, 2014 22:52
by balthazariv
Hello,

I have this error

0:49:00: ERROR[main]: ========== ERROR FROM LUA ===========
00:49:00: ERROR[main]: Failed to load and run script from
00:49:00: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\mint\init.lua:
00:49:00: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\mint\init.lua:86: bad argument #1 to 'lines' (L:\Minetest\minetest - Copie\bin\..\worlds\Test/accounts.dat: No such file or directory)
00:49:00: ERROR[main]: stack traceback:
00:49:00: ERROR[main]: [C]: in function 'lines'
00:49:00: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\mint\init.lua:86: in function 'loadaccountsdatabase'
00:49:00: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\mint\init.lua:1188: in function 'mintonstartup'
00:49:00: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\mint\init.lua:1194: in main chunk
00:49:00: ERROR[main]: ======= END OF ERROR FROM LUA ========

Re: [Mod] Mint & Automatic Commerce Machines [mint]

PostPosted: Sun Nov 22, 2015 14:01
by tbillion
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2015-11-22 07:55:36: ERROR[Main]: ModError: Failed to load and run script from /home/tjohnson/Downloads/minetest-master/bin/../mods/mint/init.lua:
2015-11-22 07:55:36: ERROR[Main]: .../Downloads/minetest-master/bin/../mods/mint/init.lua:86: bad argument #1 to 'lines' (/home/tjohnson/Downloads/minetest-master/bin/../worlds/Old_World/accounts.dat: No such file or directory)
2015-11-22 07:55:36: ERROR[Main]: stack traceback:
2015-11-22 07:55:36: ERROR[Main]:       [C]: in function 'lines'
2015-11-22 07:55:36: ERROR[Main]:       .../Downloads/minetest-master/bin/../mods/mint/init.lua:86: in function 'loadaccountsdatabase'
2015-11-22 07:55:36: ERROR[Main]:       .../Downloads/minetest-master/bin/../mods/mint/init.lua:1188: in function 'mintonstartup'
2015-11-22 07:55:36: ERROR[Main]:       .../Downloads/minetest-master/bin/../mods/mint/init.lua:1194: in main chunk
2015-11-22 07:55:36: ERROR[Main]: Check debug.txt for details.