Hallo zusammen,
ich habe leider ein Problem mit meinem Code der sich nicht herunterladen lässt.
Ich kann ihn im editor https://makecode.calliope.cc/ laufen lassen aber sobald ich versuche ihn herunterzuladen sagt er mir er hätte ein Kompilierungsfehler in der dal.d.ts Datei die im Core liegt und dann verschwindet die kleine rote Eins die neben dieser Datei angezeigt wird.
hier ist die main Datei:
music.beginMelody(collections.duck, MelodyOptions.Once)
utils.plotMatrix(collections.playImage)
basic.pause(1000)
basic.forever(() => {
utils.plotAnimation(collections.numbers, 1000);
utils.plotAnimation(collections.animation, 100);
for (let b = 0; b <= 5 - 1; b++) {
for (let c = 0; c <= 5 - 1; c++) {
led.plot(c, b)
basic.pause(100)
led.unplot(c, b)
}
}
})
und meine custom Datei:
/**
-
Utility Functions
*/
//% weight=100 color=#0fbc11 icon=“”
namespace utils {
export let breakFunc = falseexport function plotMatrix(m: Array<Array>) {
b: for (let z = 0; z < m.length; z++) {
let r = m[z]
for (let a = 0; a < r.length; a++) {
if (breakFunc) break b;
(r[a] > 0) ? led.plot(a, z) : led.unplot(a, z)
}
}
}export function plotAnimation(a: Array<Array<Array>>, p: NumberFormat) {
for (let m of a) {
plotMatrix(m)
basic.pause§
}
}export function clear() {
for (let x = 0; x <= 5 - 1; x++) {
for (let y = 0; y <= 5 - 1; y++) {
led.unplot(x, y)
}
}
}
}
namespace collections {
export const numbers = [[[0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 0]], [[0, 0, 1, 0, 0], [0, 1, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0]], [[0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 1, 1, 1, 0]], [[0, 1, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 1, 1, 0], [0, 0, 0, 1, 0], [0, 1, 1, 0, 0]], [[0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 1, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 0]], [[0, 1, 1, 1, 0], [0, 1, 0, 0, 0], [0, 1, 1, 0, 0], [0, 0, 0, 1, 0], [0, 1, 1, 0, 0]], [[0, 0, 1, 1, 0], [0, 1, 0, 0, 0], [0, 1, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 0]], [[0, 1, 1, 1, 0], [0, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0]], [[0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 0]], [[0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 1, 1, 0], [0, 0, 0, 1, 0], [0, 0, 1, 0, 0]]]
export const animation = [[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]], [[0, 0, 1, 0, 0], [0, 1, 1, 1, 0], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0]], [[0, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1]], [[1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [0, 0, 0, 0, 0], [1, 0, 0, 0, 1], [1, 1, 0, 1, 1]], [[1, 0, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [1, 0, 0, 0, 1]], [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]]
export const duck = [“c5:4”, “d5:4”, “e5:4”, “f5:4”, “g5:8”, “g5:8”, “a5:4”, “a5:4”, “a5:4”, “a5:4”, “g5:16”, “a5:4”, “a5:4”, “a5:4”, “a5:4”, “g5:16”, “f5:4”, “f5:4”, “f5:4”, “f5:4”, “e5:8”, “e5:8”, “g5:4”, “g5:4”, “g5:4”, “g5:4”, “c5:16”]
export const playImage = [[0, 1, 0, 0, 0], [0, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 1, 1, 0, 0], [0, 1, 0, 0, 0]]
}
Falls jemand wüsste was das Problem ist wäre dies ein große hilfe
VG
Mehdi