i have a main.lua and a class file and i manage to call the class:method, but how to read/write the property?
main.lua
-- calling class, package
local player = require("CLSPlayer")
player:callme()
CLSPlayer.lua
module(..., package.seeall)
--[[
PLAYER CLASS
PROPERTIES
METHOD
]]
-- local properties
local myProp = 777
-- local functions must initiate before call
local function localCall()
print('in CLSPlayer ... localCall function')
end
function CLSPlayer:callme()
print('calling CLSPlayer:callme()')
localCall()
end
how can the main.lua read/write ‘myProp’?
Thanks for the advice [import]uid: 10373 topic_id: 7759 reply_id: 307759[/import]