top of page

9

Beginner

AZSTOKe_sample_tableInsert

Add new value between arrays

RANK

function Msg(param)

    reaper.ShowConsoleMsg(tostring(param).."\n")

end


t = {"A","C"}

table.insert(t,2,"B")


for i = 1,3 do

Msg(t[i])

end

table.insert(t,"D")


for i = 1,4 do

Msg(t[i])

end

function Msg(param)

     reaper.ShowConsoleMsg(tostring(param).."\n")

end


  • Set Msg console output function


t = {"A","C"}


  • Define an array.


table.insert(t,2,"B")


  • Insert "B" into the second position of the array.


for i = 1,3 do

Msg(t[i])

end


  • Outputs the value of array index (1 to 3) to the console.


table.insert(t,"D")


  • Insert "D" at the end of the array.


for i = 1,4 do

Msg(t[i])

end


  • Outputs the value of array index (1 to 4) to the console.

To use the API, you need to sign up for a plan.

Download the dedicated API

need to do it.

*SILVER is scheduled to be released in May.

No preparation required

- Script Code -
- Script Image -
- Warm Up -
- Script Detail -
- API -

LUA

​ReaScript File Download 👇

* A dedicated API is required to run this

- Script Image -
bottom of page