# Post Information

griefercube wrote in Official [scratchblocks] Testing Topic 3 at 11:09:56 AM 15/9/2020
The best way(and easiest) to make cloud encoder/decoder
`define If cloud contains (_)set [charlist v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ.!? 1234567890-_]set [repeat v] to set [output v] to []set [answer v] to []repeat (length of (_::custom)::operators)    set [repeat2 v] to     change [repeat v] by (1)    repeat until <(letter (repeat2) of (charlist)) = (letter (repeat) of (_::custom))>        change [repeat2 v] by (1)    end    set [output v] to (join (output) ((repeat2) + (9)))    set [answer v] to (join (answer::variables) ((repeat2) + (9)))endset [output v] to <(☁ cooud) contains (output)?::operators>set [answer v] to <(☁ cloud 2) contains (answer::variables)?::operators>when I receive [Reset v]set [☁ A v] to set [☁ B v] to set [☁ cloud 2 v] to set [☁ cooud v] to when @greenFlag clickedIf cloud contains (username)::customif <<(output) = [false]> and <(answer::variables) = [false]>> then    ask [What do you vote? A/B] and wait    if <not <<(answer) = [A]> or <(answer) = [B]>>> then        say [Please answer again and click the green flag] for (2) seconds    else        if <(answer) = [A]> then            change [☁ A v] by (1)        end        if <(answer) = [B]> then            change [☁ B v] by (1)        end        Add (username) To cloud::custom    endelse    say [Sorry, you have voted]enddefine Add (String) To cloudset [charlist v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ.!? 1234567890-_]set [Uh, save cloud change v] to []set [repeat v] to repeat (length of (String::custom)::operators)    set [repeat2 v] to     change [repeat v] by (1)    repeat until <(letter (repeat2) of (charlist)) = (letter (repeat) of (String::custom))>        change [repeat2 v] by (1)    end    set [Uh, save cloud change v] to (join (Uh, save cloud change) ((repeat2) + (9)))endif <(☁ next cloud count) = > then    set [☁ cooud v] to (Uh, save cloud change)else    set [☁ cloud 2 v] to (Uh, save cloud change)endif <(☁ next cloud count) > > then    set [☁ next cloud count v] to endchange [☁ next cloud count v] by (1)set [Uh, save cloud change v] to `