No, "short i;" is declared alright (thou, it would be *nicer* to have "short i = 0;" or something). The problem is probably these lines:
while (1==1) {
if (Player[0].Ore() < 10000) {
Player[0].SetOre(1000);
}
}
Try changing it to just this (getting rid of the while):
if (Player[0].Ore() < 1000)
Player[0].SetOre(1000);
You had "while(1==1)", which causes an infinite loop, and since you had not "break;" statements in the loop, the program just gets stuck there.