Posted 10 June 2014 - 12:06 PM
Hi all,
Firstly, please don't lynch me for using such an outdated version of CC, it's not up to me, it's up to the mod pack creator, and they want to stay at this version for compatibility with other mods (yeah, I know).
Secondly, I can't get the file off the server, so I can't pastebin it here for you to look at (unless I'm just stupid, then please, let me know)
Anyway,
I have all of my code in separate functions and two functions with while true loops, like so:
but it seems that whenever I run the program, only the function listed first in the waitForAny() function call parameters gets run. For example, if I have the order of the parameters as:
In the above case, drawDynamic() will run, but updateExternal() never seems to run, and if I reverse the order:
Then in this case updateExternal() will run, but drawDynamic() does not seem to run.
Is this a bug with this version, or with the particular implementation, or with my use of the api? And is there a workaround or a fix I could use to get this to work? (Short of using multiple computers :)/> )
Thanks
Firstly, please don't lynch me for using such an outdated version of CC, it's not up to me, it's up to the mod pack creator, and they want to stay at this version for compatibility with other mods (yeah, I know).
Secondly, I can't get the file off the server, so I can't pastebin it here for you to look at (unless I'm just stupid, then please, let me know)
Anyway,
I have all of my code in separate functions and two functions with while true loops, like so:
local function something()
end
local function somethingElse()
end
...
local function drawDynamic()
while true do
all of the things
end
end
local function updateExternal()
while true do
all of the other things
end
end
parallel.waitForAny(drawDynamic(), updateExternal())
but it seems that whenever I run the program, only the function listed first in the waitForAny() function call parameters gets run. For example, if I have the order of the parameters as:
parallel.waitForAny(drawDynamic(), updateExternal())
In the above case, drawDynamic() will run, but updateExternal() never seems to run, and if I reverse the order:
parallel.waitForAny(updateExternal(), drawDynamic())
Then in this case updateExternal() will run, but drawDynamic() does not seem to run.
Is this a bug with this version, or with the particular implementation, or with my use of the api? And is there a workaround or a fix I could use to get this to work? (Short of using multiple computers :)/> )
Thanks