Skip to content

Commit dbd26bb

Browse files
committed
Update Error show
1 parent e90ab3b commit dbd26bb

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

zff

72 Bytes
Binary file not shown.

zff_main_en.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ cc winok[10][100] = {
5252
};
5353
cc ebox[20][250] = {
5454
"",
55-
" ---------- Error 1: Out ----------\n",
56-
" ---------- Error 2: Install error ----------\n",
57-
" ---------- Error 3: Start game error ----------\n",
58-
" ---------- Error 4: Input error ----------\n input again.\n",
55+
" ---------- Error 1: Out ----------",
56+
" ---------- Error 2: Install error ----------",
57+
" ---------- Error 3: Start game error ----------",
58+
" ---------- Error 4: Input error ----------",
5959
" ---------- Error 5: User not found ----------\n run 'zff init' to fix.\n"
6060
};
6161
int tr,kd,fx,fy,hx,hy,s=0;
@@ -239,7 +239,7 @@ int start(){
239239
printlogo();
240240
if(level==-1||getboot()!=1){
241241
//maken();
242-
printf ("%s", ebox[5]);
242+
printf ("%s\n", ebox[5]);
243243
exit (-5);
244244
}
245245
//system("clear");
@@ -255,11 +255,14 @@ int start(){
255255
}
256256
int game(){
257257
s=0;
258+
char rce[300]="";
258259
while(true){
259260
if(fx==hx&&fy==hy){
260261
return win();
261262
}
262263
system("clear");
264+
printf (" %s\n", rce);
265+
strcpy(rce,"");
263266
for(int i=1;i<=n;i++){
264267
for(int j=0;j<27-n;j++){
265268
cout<<" ";
@@ -288,17 +291,19 @@ int game(){
288291
}
289292
if(r!=1 && r!=2 && r!=3 && r!=4 && r!=0 && r!=27){
290293
system("clear");
291-
printf("%s",ebox[4]);
294+
//printf("%s",ebox[4]);
295+
strcpy(rce,ebox[4]);
292296
//printf("%d",r);
293297
//sleep(0.1);
294-
syscls();
298+
//syscls();
295299
continue;
296300
}
297301
if(r>0&&r<5){
298302
//move
299303
system("clear");
300304
if(hx+nx[r]<=1||hx+nx[r]>n-1||hy+ny[r]<=1||hy+ny[r]>n-1){
301-
printf("%s", ebox[1]);
305+
//printf("%s", ebox[1]);
306+
strcpy(rce,ebox[1]);
302307
//sleep(0.1);
303308
continue;
304309
}
@@ -479,7 +484,7 @@ int main(int argc, char* argv[]){
479484
}
480485
else
481486
{
482-
printf ("%s", ebox[4]);
487+
printf ("%s\n", ebox[4]);
483488
return 4;
484489
}
485490
sleep(1);

0 commit comments

Comments
 (0)