function setId(id) m.id = id return m end function
function setName(name) m.name = name return m end function
In Roku Os 7.7 I didn't face this problem. And now I have a compile error. Strange indeed.
------ Compiling dev 'Roku Scene Graph' ------ 11-09 06:03:15.665 [scrpt.cmpl.time] Compiled 'Roku Scene Graph', id 'dev' in 1 milliseconds 11-09 06:03:15.668 [scrpt.load.mkup] Loading markup dev 'Roku Scene Graph'
================================================================= Found 2 compile errors in file pkg:/components/Video.brs included from file pkg:/components/MainScene.xml --- SUB or FUNCTION defined twice. (compile error &had) in pkg:/components/Video.brs(19) 'setid' --- SUB or FUNCTION defined twice. (compile error &had) in pkg:/components/Video.brs(24) 'setname'
================================================================= An error occurred while attempting to compile the application's components: -------> Error parsing XML component MainScene
Please help me to find any workaround. I understand that I can include methods inside constructor function but I need to change so much. I have getters and setters outside constructor everywhere. Any help highly appreciated !
Re: SUB or FUNCTION defined twice. (compile error &had) in Roku Os 8
I ran in to the same thing, I believe the compiler stricter with 8.0 My duplicate functions were allowed (and worked fine as far as I know) in 7.7, which is somewhat baffling. I changed the function names and all is well.