This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
luckdemon's profile picture

Help running parallel functions

Started by luckdemon, 22 May 2013 - 11:18 AM
luckdemon #1
Posted 22 May 2013 - 01:18 PM
Hi!

So im running FTB with Miscperipherals and trying to create a program for my xp/anvil turtle.

Here's my code so far: http://pastebin.com/zpeVjNLf

Yeah I know it's messy, partly because i'm still new to coding in general, and partly because I raged when it didn't work properly and stuffed it full of prints and sleeps to find out where it was hanging.

So the general problem is that the function eventHandle, the one that handles all of the keystrokes, isn't running at the same time as the modeHandle function, that runs the proper separate function based on which mode it is in.

The intended effect is to have it either automatically enchant books at lvl 30 (autoEnchant), manually enchant books when the player selects the lvl to enchant at, and press enter (manEnchant), or be used as an anvil. I can get either the keystroke intake, or the mode function working, but not both at the same time.

Any help is appreciated, thanks.
-Luck
Lyqyd #2
Posted 22 May 2013 - 01:24 PM
Split into new topic.

You are in the Members group and should have posted a new topic yourself.

You're calling the functions instead of passing them to the parallel call. Remove the parentheses from each of the function calls.
luckdemon #3
Posted 22 May 2013 - 01:38 PM
Thanks!
And I'm sorry I didn't just post a new topic, when I checked last night I was in the new members group.