local a = 2
local function test()
end
local function test2()
end
test() = a
test2() = a x 2
print (test)
print (test2)
new scripter, btw
local a = 2
local function test()
end
local function test2()
end
test() = a
test2() = a x 2
print (test)
print (test2)
new scripter, btw
I see a few things wrong
“x” is not “times,” “*” is
calling functions that are empty and then assigning them to an integer
printing functions
is test supposed to be a variable? get rid of the functions, and try
local test = a
local test2 = a*2
Thank you! I’m a new scripter experimenting so I don’t know a lot. yes, it is trying to be a variable.
“function” is a new set of code, so if you call test, it’s going to do something else
for example
local a = 2
local function test (b)
return 2*b
end
local test2 = test(a)
print(test2)
should return 4
Just used the tips you gave me, but i wanted to use a function to practice and now i have
local function test()
local a = 2
print (a*2)
end
local function test2()
local a = 2
print (a+2)
end
test()
test2()
works like a charm! thank you