Here is a narrowed-down example, the first case works, but the second one refuses to use the compiled version:
Compile[{}, Permutations[{1, 2, 3}]][]
Compile[{}, Permutations[{1, 2, 3}, {2}]][]
Full code:
Compile[{},
Module[{c, d, e, g, l, m, o, t, w, A = 10^Range[5, 0, -1]},
Do[{c, d, e, g, l, m, o, t, w} = x;
If[{w, w, w, d, o, t}.A - {g, o, o, g, l, e}.A == {d, o, t, c, o,
m}.A, Print@x], {x, Permutations[Range[0, 9], {9}]}]]
][]