How to print a value

i think i need use this one:

--!strict
export type Cameras = "Camera1" | "Camera2"
local module = {}

function module.print(value : any?)
	prant(value)
end


function module.new(camera:Cameras)
	local self = setmetatable({cameratype = camera}, {__index = module} )
	module.print(camera)
	return self
end

return module

no it’s dont work, pls help i cant output

--!strict
export type Cameras = "Camera1" | "Camera2"
local module = {}

function module.print(value : any?)
	print(value)
end


function module.new(camera:Cameras)
	local self = setmetatable({cameratype = camera}, {__index = module} )
	module.print(camera)
	return self
end

return module

it’s dont work, pls another ways

here i guess

export type Cameras = "Camera1" | "Camera2"
local module = {}
function prant(value:any?)
	print(value)
end

function module.print(value : any?)
	prant(value)
end

function module.new(camera:Cameras)
	local self = setmetatable({cameratype = camera}, {__index = module} )
	module.print(camera)
	return self
end

return module
2 Likes

yayayayyayayaya
yay
thank you so much

bro you real good scripter, you really one of bill gates

  • You have additional details
  • The solution doesn’t work for you

error(self.cameratype) --error

  • You have additional details
  • You have additional details
function sum(a, b)
return a+b
end

local result = sum(2, 2)
a == a -- true
b == b -- true
c == c -- true
x == x -- true
b == a --false
x == c --false
a == a --true
b == a --false

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.