Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent Error on line 236 of Twitch2DCS.lua #13

Open
danw-eth opened this issue May 19, 2023 · 5 comments
Open

Intermittent Error on line 236 of Twitch2DCS.lua #13

danw-eth opened this issue May 19, 2023 · 5 comments

Comments

@danw-eth
Copy link

Getting error intermittently something like every 2nd restart, sometimes 2/3 restarts of DCS.
There's nothing wrong with options.lua and the oauth code is correct, because it works many other times.

Once the error/msgbox happens, the chatbox is non-functional and chat messages won't appear in that session of DCS.

Error is
"[string "C:\Users\danwa\Saved Games\DCS.openbeta\Scripts\Twitch2DCS.lua"]:236: loop in gettable"

Removing the "self:isEnabled()" check from line 236 in Twitch2DCS.lua seems to have fixed the issue, and the chatbox will now function every time.

The new line 36 is
if err and err ~= "timeout" and err == "closed" then

I leave mine enabled all the time, so I assume its ok to skip that check. You may want to look into why it is failing as there's a few recent posts on the DCS thread having similar issue. I can't find a definitive way to reproduce it except that it's intermittent and restarting sometimes fixes it.

@Eld0r
Copy link

Eld0r commented May 19, 2023

+1, only happens roughly 1/3 starts to me tho.
thank you very much!

@rthom91
Copy link
Contributor

rthom91 commented May 19, 2023

Try this. Go to your Twitch settings 'Connections' tab and revoke TwitchApps. Go back to twitchapps.com and get a new token and enter the new one into the DCS settings box and restart DCS. Does it then stop doing it as frequent?

@danw-eth
Copy link
Author

danw-eth commented May 23, 2023

Thanks did this, but unfortunately it now started giving another random error "[string "C:\Users\username\Saved Games\DCS.openbeta\Scripts\twitch\server.lua"]:38: attempt to index field 'connection' (a nil value)"

This is also intermittent i.e. restarting DCS usually gets rid of the error. It's like on 50% of DCS starts or something like that.

@Camble
Copy link
Contributor

Camble commented Jun 14, 2023

#10
This has already been fixed, but a release hasn't been created since 2021. You can grab the latest code from the repo instead though.

@rthom91
Copy link
Contributor

rthom91 commented Jun 14, 2023

I haven't bothered touching this in years but if you want a slightly more updated and thinner build, download my master.
https://github.com/rthom91/twitch2dcs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants