#what do i use here and how?
22 messages · Page 1 of 1 (latest)
bro what
If you wanna add 10% to something you simply multiply it by 1.1, 50%, you multiply by 1.5, etc
You can just use an attribute or numbervalue to do this. Simply make a new value and put it under the rune, give it the multi and whenever you assign values you just do someValue += anotherValue * Numbervalue.Value
I was hoping to be able to make a dictionary and add all my values there, just not sure how to use em completley @echo heath
You can use a dictionary just like instances
local fruitDitctionairy = {
"Name" = "Apple",
"Price" = 5,
"Stock" = 10
}
print("Name: "..fruitDictionairy.Name)```
;compile
;compile
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:2: '}' expected (to close '{' at line 1) near '='
mrjamp | lua | lua-5.4.3 | wandbox.org
Bruh 2 sec
local fruitDitctionairy = {"Name" = "Apple", "Price" = 5, "Stock" = 10}
print("Name: "..fruitDictionairy.Name)```
;compile
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:1: '}' expected near '='
mrjamp | lua | lua-5.4.3 | wandbox.org
;compile
local duc = {
["Test"] = 5}
print(duc.Test)
Program Output
5
icy4321 | lua | lua-5.4.3 | wandbox.org
You forgot []
Yup