I can't run .lua scripts (win10-64bit)

jmalmsten

New Member
Ok, I am feeling like I'm missing something pretty fundamental here. I put lua scripts in the correct folder. I load the script in the scripts panel using the plus icon. I set up stuff in the description side.

But I have never... ever... gotten any lua script to actually run.

There's no error message. Nothing in the Script log. Nothing. I have no idea what I am doing wrong. I have tried to do this for years. Several versions of OBS. Rebootings, running app as admin, everything I can think of. It just refuses to run the lua script.

Does anyone have any idea what I can be doing wrong?

I'm using windows 10 64bit. OBS install is 26.1.1(64 bit) which is the latest according to the check for updates function. All I want to set up is a simple countdown timer that updates a textfile so it can be shown as a source... I have been trying every lua script I can find for this. Both the ones that are in the default OBS install and several that are uploaded to the forums here.

the attached screen shot shows the source I am pointing the lua script towards. That source is set up to read the text-file called tCD.txt on my drive. The "fcedwsreg" is nonsense what I typed in the text file just so I could see if the script writes anything to it. Apparently it does not. I have tried both hitting start/stop and reset. I have tried both as global timer or activated when source is active. I have tried hiding and showing the source with the eyeball. Nothing does anything. And again. It's not just this particular script. It's just the latest attempt I've tried. I cannot get any lua script to do anything.

If anyone has any suggestions, I am all ears. Because I am certain it's not a programming fault, because I find noone else having this issue. It must be user error. But I cannot think of more things to try.

I attached the latest log file as well if it helps illuminate anything.
 

Attachments

  • luaTrouble.PNG
    luaTrouble.PNG
    43.1 KB · Views: 396
  • 2021-03-07 16-04-45.txt
    14.3 KB · Views: 171

jmalmsten

New Member
Oh, for crying out loud... Gaddammit... and other expletitives... I found my problem. And as I suspected... it was user error...


it seems I had misunderstood the whole thing... My text source should NOT have a connection to a text file... As the text file will then overwrite whatever is in the text source string. Including whatever the lua script is putting in there...

So I just went in there, tried unchecking the tick-box for loading text from a file... and the darned thing sprung to life...

Flippin heck! The hours wasted... And I can't even blame it on anyone! :D

screenshot attached for peoples amusement.
 

Attachments

  • readFromFile.PNG
    readFromFile.PNG
    37.7 KB · Views: 411

lofihap

Member
Dont feel bad! You kept digging until you found the problem. That's more important that what the problem was.
 
Top