Good day,
I apologize if this is the wrong area to post this.
I have a little LUA programming experience, but I just started dabbling with DCS scripting. I am trying to add an extension to rkusa's Scratchpad script to add the current aircraft type with a button. I believe it is something like this:
addButton(0, 0, 50, 30, "CLR", function(text)
local actype = Unit.getByName('myUnit'):getTypeName()
local padtext = "Type:" .. actype
log(padtext)
text:setText(padtext)
end)
But I am unsure if I got the syntax right since nothing is added to the scratchpad or the log.