repeat 0
  #defcfunc twice int test
  bai = 2
  return test * bai
loop

//main
  bai = 10
  mes twice(bai)

これ普通に20って表示されるんだが。
最初の使用前に宣言していない、#module使ってる、仮引数名を使ってるかのどれかかと思われ