Using the same code without conflict error?

in as 2.0, u could use the same code many times. i’m making a gallery, and i want to have many galleries. but when i copy my gallery code, it says “a conflict exists with definition”

how can you make many galleries without this error?

my galleries codes are in different frames.