I recently made a script that would take some data from RAM and make it readable. It uses gg.copyText() function to copy that data in the following chunk:
printRes = tostring(getTune1[1].value + 1) .. "/" .. tostring(getTune2[1].value + 1) .. "/" .. tostring(getTune3[1].value + 1) ..
"/" .. tostring(getTune4[1].value + 1) .. "\n" .. strPart1 .. "-" .. tostring(getPartTune1[1].value) ..
" " .. strPart2 .. "-" .. tostring(getPartTune2[1].value) .. " " .. strPart3 .. "-" ..
tostring(getPartTune3[1].value) .. "\nBy :flag_" .. strFlag .. ":" .. strName .. "\nusing " ..
strVehicle .. "\nIn " .. strMap .. "\non 20" .. strDate .. "\nWith a time of: " ..
tostring(getTime[1].value) .. " seconds\n\n"
collectTune = gg.alert(printRes, "Continue", "Copy the tune")
if collectTune == 1 then
return 0
else
gg.copyText(printRes)
end
now I did assume that it was an issue with me assigning it to a variable and then copying the variable but that didn't seem to be the problem as it still didn't copy the spaces. Attached is what I got displayed in the gg.alert() function which seems to be completely fine and have all the spaces needed. Following text is what I received to my clipboard after pressing "Copy the tune" button in the alert function:
20/20/10/20
winter_tyres-15start_boost-10nitro-4
By:flag_fi:RS3113
usingsuperbike
Indark_roads_cup_03_04
on2024_2_february
Withatimeof:9.55695629119873seconds
I couldn't find any explanation anywhere.