Menche
Member
Posts: 1001 Joined: Sat Jul 02, 2011 00:43
IRC: Menchers
In-game: Menche
Location: An island in a lava lake.
by Menche » Sat Jul 21, 2012 04:04
Post
Does line 54 do anything?
It caused my server to crash, with this message:
Code: Select all
12:40:42: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: /home/daniel/.minetest/mods/minetest/money/init.lua:54: attempt to perform arithmetic on local 'amount' (a string value)
An innocent kitten dies every time you top-post.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 09:32
Post
You should delete the line.
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Sat Jul 21, 2012 10:40
Post
Does your mod support adding new types of stores?
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 10:47
Post
No. What do you mean by new types of stores?
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Sat Jul 21, 2012 11:07
Post
Well right now your stores requires two nodes because you cant have an inventory and input field on the same meta/node. I think i have an idea for single-node stores that could work
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 11:21
Post
This is very interesting idea, but how do it?
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Sat Jul 21, 2012 11:42
Post
single node stores wouldn't have inventories like chests. They'd be like zip-nodes: a single node containing within 100,200, etc. of the nodetype. We could have one meta (signlike) to set the prices, and a seperate meta (not mutable) to save the remaining QTY. the QTY would be displayed in the infotext, while the prices you edit like signs.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 12:24
Post
What will store owner do, when he want take/give the nodes from/to store?
Menche
Member
Posts: 1001 Joined: Sat Jul 02, 2011 00:43
IRC: Menchers
In-game: Menche
Location: An island in a lava lake.
by Menche » Sat Jul 21, 2012 16:26
Post
It crashed again, with this message:
Code: Select all
23:26:25: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: /home/daniel/.minetest/mods/minetest/money/init.lua:64: attempt to compare string with number
It seems to crash whenever the /money command is used with a negative number.
This is the offending line:
Is "amount" a string? I really don't understand that command definition, sorry.
Last edited by
Menche on Sat Jul 21, 2012 16:31, edited 1 time in total.
An innocent kitten dies every time you top-post.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 16:31
Post
Replace
to
and add
or
after
Code: Select all
elseif tonumber(amount) < 0 then
minetest.chat_send_player(name, "The amount must be greater than 0.")
return true
end
and replace
to
I hope there are no bugs in my mod.
Last edited by
kotolegokot on Sat Jul 21, 2012 16:45, edited 1 time in total.
Menche
Member
Posts: 1001 Joined: Sat Jul 02, 2011 00:43
IRC: Menchers
In-game: Menche
Location: An island in a lava lake.
by Menche » Sat Jul 21, 2012 16:32
Post
kotolegokot wrote: "amount" is a number. Which command do you use?
It said "attempt to compare string with number" when it crashed. It crashed when /money pay player was used with a negative number.
An innocent kitten dies every time you top-post.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sat Jul 21, 2012 16:46
Post
See previous post or just download and setup mod again.
And thank you very much for your great help in fixing errors.
Last edited by
kotolegokot on Sat Jul 21, 2012 16:54, edited 1 time in total.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Sun Jul 22, 2012 16:31
Post
mauvebic, I read lua_api.txt and I know, how realize your idea!
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Tue Jul 24, 2012 13:36
Post
NEW BIG UPDATE! (See first post)
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Tue Jul 24, 2012 14:42
Post
Nice :-) glad you figured out the singlenode shops :-) Could you do the same thing but in barter? exchange nodes for nodes, instead of for money?
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Tue Jul 24, 2012 15:51
Post
Thank you! Yes, I want do it in next update.
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Tue Jul 24, 2012 16:10
Post
Dont thank me, your formspec gave me an idea for my linking books, ive been looking for a way to name the books and show who they belong to :-)
If you get the barter working ill include in nullspace (with your permission) :-)
Last edited by
mauvebic on Tue Jul 24, 2012 16:10, edited 1 time in total.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Tue Jul 24, 2012 16:17
Post
What is nullspace?
mauvebic
Member
Posts: 1550 Joined: Fri Jan 27, 2012 11:32
by mauvebic » Tue Jul 24, 2012 16:20
Post
customized game mode, with a disabled mapgen, modified and additional default mods (
link here ). I figure barter would come in handy on maps with extremely limited resources :-)
Nubelite
Member
Posts: 161 Joined: Mon Jul 16, 2012 23:10
by Nubelite » Wed Jul 25, 2012 05:32
Post
when i try to access the one node shop i get this. It opens the black square in the top left corner and that's it. any ideas?
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Wed Jul 25, 2012 06:19
Post
Try use last version of Minetest. And you should download money mod again. In a recent version of Minetest, locked chest is working on another.
Last edited by
kotolegokot on Wed Jul 25, 2012 06:37, edited 1 time in total.
Nubelite
Member
Posts: 161 Joined: Mon Jul 16, 2012 23:10
by Nubelite » Wed Jul 25, 2012 07:46
Post
installed the latest stable release 4.1 and same result. Also using the github version of the mod link.
running ubuntu 64 bit if it helps.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Wed Jul 25, 2012 07:55
Post
I think I fix the error.
kotolegokot
Member
Posts: 131 Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim
by kotolegokot » Wed Jul 25, 2012 14:41
Post
Added barter shop. See first post.
Users browsing this forum: No registered users and 3 guests