[Solved] Formspec gui silder help

Post Reply
Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

[Solved] Formspec gui silder help

by Coder12 » Post

How do you set the min and max of the Formspec silder because its always (0 - 1000).
Last edited by Coder12 on Sun Oct 01, 2017 20:04, edited 1 time in total.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Formspec gui silder help

by azekill_DIABLO » Post

no idea what you're talking about... can you show some code?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Formspec gui silder help

by Krock » Post

There's no option to set these limits. However, you can use a workaround:

Code: Select all

local value_input = ?? -- value between 0 ... 1000
local MIN_VALUE = 20
local MAX_VALUE = 150 -- or whatever value range you want

local value = value_input / 1000 * (MAX_VALUE - MIN_VALUE) + MIN_VALUE

return value -- this is what you want. Round it, if it's a long decimal number
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: Formspec gui silder help

by Coder12 » Post

thanks Krock.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests