local rateMod = string.gsub(GetRateMod(),'x','')
- if lowBPM == "Various" or lowBPM == "..." or lowBPM == nil then
+ if lowBPM == "Various" or lowBPM == "..." or lowBPM == nil or tonumber(lowBPM) == nil then
return "???"
end
if speedMod.Type == "c-mod" or speedMod.Type == "m-mod" then return tostring((speedMod.Base + speedMod.Extra)*100) end
- if lowBPM == "Various" or lowBPM == "..." or lowBPM == nil then
+ if lowBPM == "Various" or lowBPM == "..." or lowBPM == nil or tonumber(lowBPM) == nil then
return "???"
end
local function LowBPM( BPMDisplay )
BPMDisplay = BPMDisplay:GetText()
+ Trace("YOLOSWEGGER " .. BPMDisplay)
+
local pos = string.find(BPMDisplay, "-")
+
+ if pos == 1 then pos = string.find(BPMDisplay, "-", 2) end -- if we have a negative bpm at the start then look for another occurence after
+
if pos then return string.sub(BPMDisplay,1,pos-1) else return BPMDisplay end
end
BPMDisplay = BPMDisplay:GetText()
local pos = string.find(BPMDisplay, "-")
+
+ if pos == 1 then pos = string.find(BPMDisplay, "-", 2) end -- if we have a negative bpm at the start then look for another occurence after
+
if pos then return string.sub(BPMDisplay,pos+1) else return BPMDisplay end
end