Code: Select all
function Update()
return cperiod()
SKIN:Bang('[!UpdateMeter ScrollingText][!UpdateMeter ScrollingText2][!UpdateMeter ScrollingText3]') end
end
end
Any help would be appreciated. Thanks!
Code: Select all
function Update()
return cperiod()
SKIN:Bang('[!UpdateMeter ScrollingText][!UpdateMeter ScrollingText2][!UpdateMeter ScrollingText3]') end
end
end
There are too many end commands. Only one single is needed, the one closing the Update() function. The other two have to be removed. Remove them and try again. Have this fixed the error?FlightlessAz wrote: ↑October 13th, 2021, 7:10 am For some reason, when I enter into my lua script a "SKIN:Bang" command, it doesn't seem to work, and the script returns 0 or null for its value. looking in the about section to check what the error message says, it says "Script: File not valid" and "Script: scrolling-text-test.lua:26: 'end' expected (to close 'function' at line 24) near 'SKIN'." this is the part of the code that doesn't work in my lua script:
Code: Select all
function Update()
return cperiod()
SKIN:Bang('[!UpdateMeter ScrollingText][!UpdateMeter ScrollingText2][!UpdateMeter ScrollingText3]')
end
I did as you asked but it still doesn't work. I believe the SKIN:Bang line is the only thing causing the problem, but if necessary, I can post the entirety of my .ini and .lua file.balala wrote: ↑October 13th, 2021, 7:50 am There are too many end commands. Only one single is needed, the one closing the Update() function. The other two have to be removed. Remove them and try again. Have this fixed the error?The not posted parts of the code might require something else, but from the posted part this is what I see.Code: Select all
function Update() return cperiod() SKIN:Bang('[!UpdateMeter ScrollingText][!UpdateMeter ScrollingText2][!UpdateMeter ScrollingText3]') end
Code: Select all
function Update()
return cperiod()
SKIN:Bang('!UpdateMeter' 'ScrollingText'])
SKIN:Bang('!UpdateMeter' 'ScrollingText2'])
SKIN:Bang('!UpdateMeter' 'ScrollingText3'])
end
Hello, I tried it and it still didn't fix it. Same error popping up in the debug window. I tried deleting two of the skin:bang lines as well, but to no avail.Active Colors wrote: ↑October 13th, 2021, 9:07 am Try this:
Code: Select all
function Update() return cperiod() SKIN:Bang('!UpdateMeter' 'ScrollingText']) SKIN:Bang('!UpdateMeter' 'ScrollingText2']) SKIN:Bang('!UpdateMeter' 'ScrollingText3']) end
Unfortunately the closing brackets have been left there. Should be removed.Active Colors wrote: ↑October 13th, 2021, 9:07 am Try this:
Code: Select all
function Update() return cperiod() SKIN:Bang('!UpdateMeter' 'ScrollingText']) SKIN:Bang('!UpdateMeter' 'ScrollingText2']) SKIN:Bang('!UpdateMeter' 'ScrollingText3']) end
The posted .lua code doesn't contain the SKIN:Bang('[!UpdateMeter ScrollingText][!UpdateMeter ScrollingText2][!UpdateMeter ScrollingText3]') command, nor a similar one. However based on the last sentence:
I suppose you got it working well. Am I right?FlightlessAz wrote: ↑October 13th, 2021, 9:56 am there's some wacky naming going on in the code, and the code itself is kind of unfinished and unoptimized imo, but for me it just works out fine, so pardon me in advance.
Code: Select all
function Update()
SKIN:Bang('!UpdateMeter' 'ScrollingText'])
SKIN:Bang('!UpdateMeter' 'ScrollingText2'])
SKIN:Bang('!UpdateMeter' 'ScrollingText3'])
return cperiod()
end
I tried this line that you are referring, without the closing bracket, but it still didn't work.