Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Using multiple instances of the same module simultaneously
Started by hmclark2014 Sep 12 2019 10:51 PM

- - - - -
2 replies to this topic
module split screen scope
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

hmclark2014

[GLOBAL: userInfoPane.html]
hmclark2014
  • Observer

  • 21 posts
  • Corona SDK

Hi, I am working on adding split screen functionality to my game which requires that my game code module be ran multiple times however when I do this I get error caused by variable name conflicts. Is there anyway I can combat this?



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,246 posts
  • Corona SDK

It'd help seeing some code. For instance, how do you require your module and how do you setup the module itself.

If you've created everything within the module as a local variable, then I'm not sure how you could end up with name conflicts. Perhaps that was more common with the "module(..., package.seeall)" way of setting up modules, but if you aren't using that, then I'm out of guesses.



[TOPIC: post.html]
#3

hmclark2014

[GLOBAL: userInfoPane.html]
hmclark2014
  • Observer

  • 21 posts
  • Corona SDK

It'd help seeing some code. For instance, how do you require your module and how do you setup the module itself.

If you've created everything within the module as a local variable, then I'm not sure how you could end up with name conflicts. Perhaps that was more common with the "module(..., package.seeall)" way of setting up modules, but if you aren't using that, then I'm out of guesses.

I just had a look and it turns out that the variable was not local so it looks like I found my problem, cannot believe I looked over something like that. Thanks for jogging my memory, if I have any more troubles related to this topic I will post them here :)




[topic_controls]
[/topic_controls]