Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help
- CatPlusHouse
-
Scratcher
100+ posts
I need help
I've been staring at this stupid engine for hours, trying to fix it, it is literally half finished and I literally still can't decode a single thing, and it doesn't encode correctly, and I have no clue how the … I'm going to have multiple people (near 20+ I hope) appear on every screen, and I literally won't be able to test this thing anyways, since I literally only have one device…
Yeah I need serious help
https://scratch.mit.edu/projects/1321353188
Making it this far on the project was hard enough
Anyone?
Yeah I need serious help
https://scratch.mit.edu/projects/1321353188
Making it this far on the project was hard enough
Anyone?
Last edited by CatPlusHouse (Today 00:00:37)
- EpsilonX
-
Scratcher
87 posts
I need help
I'm not sure what exactly the issue is (cloud multiplayer is not my forte), but it would be helpful to understand what you're trying to accomplish. Also, are you using one of griffpatch's tutorials?
- OctoKittySplat
-
Scratcher
32 posts
I need help
Test ignore this.
Last edited by OctoKittySplat (Today 10:34:41)
- fIufi-
-
Scratcher
16 posts
I need help
ok after some looking i found a few simple issues in your code that were all easily fixed.
the first i found was here:define conversion to bytes (text)
set [i v] to [0]
set [result v] to []
repeat (length of (text))
change [i v] by (1)
set [temp v] to (item # of (letter (i) of (text)) in [Chars v])
if <(length of (result)) = [1]> then
set [temp v] to (join (temp) [0])
end
set [result v] to (join (result) (temp))
end
this should be: (small difference, so i highlighted the changes)define conversion to bytes (text)
set [i v] to [0]
set [result v] to []
repeat (length of (text))
change [i v] by (1)
set [temp v] to (item # of (letter (i) of (text)) in [Chars v])
if <(length of ((temp) :: #ff0000)) = [1]> then
set [temp v] to (join [0] ((temp) :: #ff0000))
end
set [result v] to (join (result) (temp))
end
the second was under:define conversion to text (bytes)
delete all of [Temp v]
repeat ([ceiling v] of ((length of (bytes)) / [2]))
change [i v] by (2)
add (join (letter (i) of (bytes)) (letter ((i)+[1]) of (bytes))) to [Temp v]
end
it should be:define conversion to text (bytes)
delete all of [Temp v]
set [i v] to (1)
repeat ([ceiling v] of ((length of (bytes)) / [2]))
add (join (letter (i) of (bytes)) (letter ((i)+[1]) of (bytes))) to [Temp v]
change [i v] by (2)
end
last error:define Setup
repeat [10]
add [0] to [Cloud-received v]
end
should be:define Setup
delete all of [Cloud-received v]
repeat [10]
add [0] to [Cloud-received v]
end
(Note that “Cloud-received” in the actual project was spelt “Cloud-recived,” but I believe the OP's intention was to spell it as the former and not the later)
- Discussion Forums
- » Help with Scripts
-
» I need help