#what do i use here and how?

22 messages · Page 1 of 1 (latest)

wide sable
#

hey i have a question on what to do here, or what i can search on devhub.

Id like each of these "Runes" you see here to have a value to multiply cash gain by, i want the game to automatically calculate and add together this value, but im sot sure what id use? sorry im still learning a lot

green stump
#

bro what

echo heath
# wide sable

If you wanna add 10% to something you simply multiply it by 1.1, 50%, you multiply by 1.5, etc

normal kiln
wide sable
normal kiln
#

You can use a dictionary just like instances

#
local fruitDitctionairy = {
"Name" = "Apple",
"Price" = 5,
"Stock" = 10
}

print("Name: "..fruitDictionairy.Name)```
frigid craterBOT
#
Critical error:

You must attach a code-block containing code to your message or reply to a message that has one.

frigid craterBOT
#
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:2: '}' expected (to close '{' at line 1) near '='

normal kiln
#

Bruh 2 sec

#
local fruitDitctionairy = {"Name" = "Apple", "Price" = 5, "Stock" = 10}

print("Name: "..fruitDictionairy.Name)```
frigid craterBOT
#
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:1: '}' expected near '='

normal kiln
#

Nvm

#

I think you get the idea

echo heath
#

;compile

local duc = {
["Test"] = 5}
print(duc.Test)
frigid craterBOT
#
Program Output
5

echo heath
normal kiln
#

Yup