Home | News | Downloads | Projects | Articles | Awards | Forums | Chat | Guestbook | About | Arcade
InvisionFree - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Sign-up for Free



Forum Topics Replies Last Post Info
Older topics
Here you can access all topics posted from May 12th 2005 to Apr 9th 2006 (In read only mode).
1126 15694 9 Apr, 2006, 11:06
In: Last Post[GAME]Learn how to count to...
By: DJ Omnimaga
 

 

 [68k C] Parse Eeror at end of input (TIGCC C), I'm getting an error and I don't know...
bfr
Posted: 20 May, 2006, 19:13


Post whore


Group: Coders Of Tomorrow
Posts: 872
Member No.: 31
Joined: 12 Apr, 2006



I'm getting an error saying, "Parse error at end of input" when I try to build the following C code for TIGCC (I know this code could be better and needs optimization, but I'll do that later):

CODE

#include <tigcclib.h>
#include "extgraph.h"

unsigned char guy[16] = {
   0x7E,0x5A,0x7E,0x18,
   0x7E,0x18,0x24,0x42,
   0x7E,0x7E,0x7E,0x18,
   0x7E,0x18,0x24,0x42
};
unsigned short i[] = {
   0x0000,0x3FFC,0x3FFC,0x3FFC,
   0x03C0,0x03C0,0x03C0,0x03C0,
   0x03C0,0x03C0,0x03C0,0x03C0,
   0x3FFC,0x3FFC,0x3FFC,0x0000,
   0x3FFC,0x4002,0x5FF2,0x4182,
   0x3DBC,0x05A0,0x05A0,0x05A0,
   0x05A0,0x05A0,0x05A0,0x3DBC,
   0x4182,0x5FFA,0x4002,0x3FFC
};
unsigned short n[] = {
   0x0000,0x700E,0x780E,0x7C0E,
   0x7E0E,0x770E,0x738E,0x71CE,
   0x70EE,0x707E,0x703E,0x700E,
   0x700E,0x700E,0x700E,0x0000,
   0x700E,0x8811,0xA415,0xB215,
   0xA115,0xA895,0xAC55,0xAA35,
   0xA915,0xA88D,0xA845,0xA835,
   0xA815,0xA815,0x8815,0x700E
};
unsigned short s[] = {
   0x0000,0x7FFE,0x7FFE,0x7FFE,
   0x7000,0x7000,0x7000,0x7FFE,
   0x7FFE,0x000E,0x000E,0x000E,
   0x7FFE,0x7FFE,0x7FFE,0x0000,
   0x7FFE,0x8001,0xBFFD,0xA001,
   0xAFFE,0xA800,0xAFFF,0xA001,
   0x8005,0xFFF5,0x0015,0x7FF5,
   0x8005,0xBFFD,0x8001,0x7FFE
};
unsigned short a[] = {
   0x0000,0x7FFE,0x7FFE,0x7FFE,
   0x700E,0x700E,0x700E,0x700E,
   0x7FFE,0x7FFE,0x700E,0x700E,
   0x700E,0x700E,0x700E,0x0000,
   0x7FFE,0x8001,0xBFFD,0xA005,
   0xAFF5,0xA815,0xA815,0xAFF5,
   0xA005,0xA005,0xAFF5,0xA815,
   0xA815,0xA815,0x8811,0x700E
};
unsigned short t[] = {
   0x0000,0x7FFE,0x7FFE,0x7FFE,
   0x03C0,0x03C0,0x03C0,0x03C0,
   0x03C0,0x03C0,0x03C0,0x03C0,
   0x03C0,0x03C0,0x03C0,0x0000,
   0x7FFE,0x8001,0xBFFD,0x8181,
   0x7DBE,0x05A0,0x05A0,0x05A0,
   0x05A0,0x05A0,0x05A0,0x05A0,
   0x05A0,0x05A0,0x0420,0x03C0
};
unsigned short y[] = {
   0x0000,0x700E,0x700E,0x700E,
   0x700E,0x7FFE,0x7FFE,0x03C0,
   0x03C0,0x03C0,0x03C0,0x03C0,
   0x03C0,0x03C0,0x03C0,0x0000,
   0x700E,0x8811,0xA815,0xA815,
   0xAFF5,0xA005,0x8181,0x7DBE,
   0x05A0,0x05A0,0x05A0,0x05A0,
   0x05A0,0x05A0,0x0420,0x03C0
};
unsigned char sml1[16] = {
   0xF0,0xF0,0xF0,0xF0,
   0xF0,0xF0,0xF0,0xF0,
   0xCC,0xCC,0xCC,0xCC,
   0xCC,0xCC,0xCC,0xCC
};
unsigned char sml2[16] = {
   0xFF,0xFF,0xFF,0xFF,
   0xFF,0xFF,0xFF,0xFF,
   0x81,0x00,0x00,0x00,
   0x00,0x00,0x00,0x81
};
unsigned short med1[32] = {
   0xFFFF,0xFFFF,0xFFFF,0xFFFF,
   0xF00F,0xF00F,0xF00F,0xF00F,
   0xF00F,0xF00F,0xF00F,0xF00F,
   0xFFFF,0xFFFF,0xFFFF,0xFFFF,
   0xFFFF,0xFFFF,0xC003,0xC003,
   0xCFF3,0xCFF3,0xCC33,0xCC33,
   0xCC33,0xCC33,0xCFF3,0xCFF3,
   0xC003,0xC003,0xFFFF,0xFFFF
};
unsigned short med2[32] = {
   0xFFFF,0xC003,0xA005,0x9009,
   0x8811,0x8421,0x8241,0x8181,
   0x8181,0x8241,0x8421,0x8811,
   0x9009,0xA005,0xC003,0xFFFF,
   0xFFFF,0xC003,0xA005,0x9009,
   0x8811,0x8421,0x8241,0x8181,
   0x8181,0x8241,0x8421,0x8811,
   0x9009,0xA005,0xC003,0xFFFF
};
unsigned long lng1[64] = {
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0x3FFFFFF8,
   0x00030000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0xFFFFFC00,0xFFFFFC00,
   0xFFFFFC00,0xFFFFFC00,0xFFFFFC00,0xFFFFFC00,
   0xFFFFFC00,0xFFFFFC00,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0xFFFFFC00,0xFFFFFC00,0xFFFFFC00,0xFFFFFC00,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000
};
unsigned long lng2[64] = {
  0x00000000,0x00000000,0x00000000,0x00000000,
   0x0FF00FF0,0x0FF00FF0,0x0FF00FF0,0x0FF00FF0,
   0x0FF00FF0,0x0FF00FF0,0x0FF00FF0,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x0FF00FF0,0x0FF00FF0,0x0FF00FF0,0x0FFFFFF0,
   0x0FFFFFF0,0x0FFFFFF0,0x0FFFFFF0,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x0FF00FF0,0x08100810,0x08100810,0x09900990,
   0x08100810,0x08100810,0x0FF00FF0,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x0FF00FF0,0x08100810,0x08100810,0x081FF810,
   0x08000010,0x08000010,0x0FFFFFF0,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x00000000,0x00000000,0x00000000,0x00000000
};
void* DARK_HIDDEN;
void* LIGHT_HIDDEN;
int pos;
unsigned char width;
unsigned char score;
unsigned char push;
unsigned char randi;
unsigned char spr1[16];
unsigned short spr2[32];
unsigned long spr3[64];
unsigned char row;
unsigned char col;
unsigned char spd;
unsigned char dsp;
unsigned long not;
typedef struct letter
{
   char x, y;
} title;
void wait(unsigned long amount){
  while(not<amount){not++;}
  not = 0;
}
void quit(void){
 GrayOff();
 ClrScr();
 free(DARK_HIDDEN);
 free(LIGHT_HIDDEN);
 exit(0);
}
void lose(void){
 GrayOff();
 ClrScr();
 free(DARK_HIDDEN);
 free(LIGHT_HIDDEN);
 printf("Your score is %d",score);
 ngetchx();
 ClrScr();
 exit(0);
}
void new(void){
 randi = random(2);
 if(randi==0){
  row = random(92);
  width = 8;
  if(random(1)==0){spr1[16] = sml1[16];}
  else{spr1[16] = sml2[16];}
 }
 else if(randi==1){
  if(random(1)==0){spr2[32] = med1[32];}
  else{spr2[32] = med2[32];}
  row = random(84);
  width = 16;
 }
 else{
  if(random(1)==0){spr3[64] = lng1[64];}
  else{spr3[64] = lng2[64];}
  row = random(68);
  width = 32;
 }
 score++;
}
void move(char amount){
 GraySprite8_XOR_R(push,pos,8,guy,&guy[16],LIGHT_HIDDEN,DARK_HIDDEN);
 pos += amount;
 GraySprite8_XOR_R(push,pos,8,guy,&guy[16],LIGHT_HIDDEN,DARK_HIDDEN);
 FastCopyScreen(LIGHT_HIDDEN,GrayGetPlane(LIGHT_PLANE));
 FastCopyScreen(DARK_HIDDEN,GrayGetPlane(DARK_PLANE));
}
void start(void){
  ClrScr();
  GraySprite8_XOR_R(push,pos,8,guy,&guy[16],LIGHT_HIDDEN,DARK_HIDDEN);
 while(!_keytest(RR_ESC)){
  if(dsp==0){new();}
  if(randi==0){
   GraySprite8_XOR_R(col,row,8,spr1,&spr1[16],LIGHT_HIDDEN,DARK_HIDDEN);
   col--;
   GraySprite8_XOR_R(col,row,width,spr1,&spr1[16],LIGHT_HIDDEN,DARK_HIDDEN);
   FastCopyScreen(LIGHT_HIDDEN,GrayGetPlane(LIGHT_PLANE));
   FastCopyScreen(DARK_HIDDEN,GrayGetPlane(DARK_PLANE));
  }
  else if(randi==1){
   GraySprite16_XOR_R(col,row,16,spr2,&spr2[32],LIGHT_HIDDEN,DARK_HIDDEN);
   col--;
   GraySprite16_XOR_R(col,row,width,spr2,&spr2[32],LIGHT_HIDDEN,DARK_HIDDEN);
   FastCopyScreen(LIGHT_HIDDEN,GrayGetPlane(LIGHT_PLANE));
   FastCopyScreen(DARK_HIDDEN,GrayGetPlane(DARK_PLANE));
  }
  else{
   GraySprite32_XOR_R(col,row,32,spr3,&spr3[64],LIGHT_HIDDEN,DARK_HIDDEN);
   col--;
   GraySprite32_XOR_R(col,row,width,spr3,&spr3[64],LIGHT_HIDDEN,DARK_HIDDEN);
   FastCopyScreen(LIGHT_HIDDEN,GrayGetPlane(LIGHT_PLANE));
   FastCopyScreen(DARK_HIDDEN,GrayGetPlane(DARK_PLANE));
  }
  if(col==0){dsp = 0;}
  if(_keytest(RR_UP)){move(-2);}
  if(_keytest(RR_DOWN)){move(2);}
  if(col==push + 8 && pos-row<width){
  push--;
  if(push==0){lose();}
  wait(50000);
 }
 quit();
}

void _main(void){
  title i;
 title n;
 title s;
 title a;
 title n2;
 title i2;
 title t;
 title y;
   DARK_HIDDEN = malloc(LCD_SIZE);
 LIGHT_HIDDEN = malloc(LCD_SIZE);
  pos = 92;
  push = 80;
  col = 160;
  spd = 1;
   dsp = 0;
   not = 0;
 clrscr();
 FontSetSys(F_4x6);
 printf_xy(60,55,"[1] Start");
 printf_xy(60,63,"[2] Speed");
 printf_xy(60,71,"[3] Exit");
  wait(100000);
  do{
   printf_xy(108,63,"%d",spd);
  if(_keytest(RR_1))start();
  if(_keytest(RR_2)){
   spd++;
   if(spd==4){spd = 1;}
   wait(100000);
   printf_xy(108,63," ");
   printf_xy(108,63,"%d",spd);
  }
  if(_keytest(RR_3))quit();
 }while(!(_keytest(RR_ENTER)));
 start();  
}


I'm always making dumb mistakes and I'd appreciate if somebody could help my find what I've done wrong.

EDIT: I just noticed that I had the same name for some variables (such as i,n,a, etc.) and I changed that, but I'm still getting the same error.

EDIT: I figured out the problem.


--------------------
[URL=http://bfr.tifreakware.net]My Website[/URL] - [URL=http://bfr.18.forumer.com]My Forums[/URL] - [URL=http://bfr.tifreakware.net/badips.php]Submit IP Addresses of Spambots and Troublemakers[/URL]

2B || !2B
Top
Ranman
Posted: 20 May, 2006, 21:38


Geezer


Group: Managers
Posts: 971
Member No.: 26
Joined: 11 Apr, 2006



I found your parsing problem...

You are missing a closing bracket somewhere near the end of your start( ) function.


--------------------
Ranman
Ultima V: Warriors of Destiny - by Lord British
Progress = 94.5% - Game engine = 61.2Kb
Top
bfr
Posted: 21 May, 2006, 8:49


Post whore


Group: Coders Of Tomorrow
Posts: 872
Member No.: 31
Joined: 12 Apr, 2006



Thanks, Ranman, that was the problem.


--------------------
[URL=http://bfr.tifreakware.net]My Website[/URL] - [URL=http://bfr.18.forumer.com]My Forums[/URL] - [URL=http://bfr.tifreakware.net/badips.php]Submit IP Addresses of Spambots and Troublemakers[/URL]

2B || !2B
Top
saubue
Posted: 21 May, 2006, 8:49


member of boolsoft


Group: Members
Posts: 160
Member No.: 19
Joined: 11 Apr, 2006



I think the closing '}' of the start-function itself is missing...


--------------------
user posted image
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
InvisionFree - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Sign-up for Free

Topic Options





TI-Freakware's TI Ring
TI-Freakware's TI Ring
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

Hosted for free by InvisionFree* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.4006 seconds | Archive

Skin by xlibman and Jc
All programs and games are property of their respective owners.