Clones not receiving data

What’s problem you are encountering?

So, I need the clones to have their data specific to them and to test this I’m having them say their data out loud (My_Name) But when I run it, none of them have their data. What confuses me is if I take apart my code and click each clone-making script individually, it works fine.

Can’t include pictures so this script is the main focus of my issue.

(
(go -200 100)
(sendAll Selectable_Writing Selector
(get All_Tasks_Index)
)
(write
(join “All Tasks:”
(data [length]
(get All_Tasks_Index)
)
) 15
)
)

This is the code I am struggling with (Located in the writer) When ran on its own it works fine, but when put together it doesn’t work, any idea why?

Link: Snap! Task Manager cleaned up (Forum)

Looking at your code, I see you’re setting a global variable before creating the clone, and then setting a local variable. You don’t need to do this. When you set a local variable before creating the clone, the clone will have the local variable with that value already.

In the when I receive scripts, it might be good to check if the sprite is a clone before running the script (you can just use (my [temporary? V]) )

Also, this is a block based language that supports spaces in variable names, you don’t need to use underscores.

Thank you! also, I know I don’t need to use underscores, They just help me categorize things

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.