Code: Alles auswählen
int eger = FileOpen("Ritter.pnk", FILE_READ);
if(eger == 0) {
eger = FileOpen("Ritter.pnk", FILE_WRITE);
FileWriteInt(eger, 0);
FileClose(eger);
SetLabelText(3, 2, "Total: 0");
}
else {
FileClose(eger);
eger = FileOpen("Ritter.pnk", FILE_READ);
int nas = FileReadInt(eger);
string nase;
StrFormat(nase, "Total: %d", nas);
SetLabelText(3, 2, nase);
FileClose(eger);
}