gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > error: called object '37224448u' is not a function

#146098 - NeX - Wed Nov 28, 2007 11:06 pm

c:/devkitpro/SandscapeCustom/source/main.c:578: error: called object '37224448u' is not a function

This has suddenly appeared. Line 578 is as follows:

case 80 ... 144:substances(substance).mass=-1-(touchXY.px-144);break;

I realise there is probably a ridiculously stupid mistake in there. But what does this cryptic error message actually mean?
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.

#146099 - Lick - Wed Nov 28, 2007 11:25 pm

What is the definition of "substances"?
_________________
http://licklick.wordpress.com

#146100 - DiscoStew - Wed Nov 28, 2007 11:37 pm

What Lick is pointing out. What is "substances"? From what it looks like, you are trying to index an array, but [] is how you access arrays elements. You are using (), which is for functions.
_________________
DS - It's all about DiscoStew

#146146 - NeX - Thu Nov 29, 2007 5:34 pm

Good point. Fixed. Thanks. Error message is a bit odd though. Where's it getting the number from?
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.

#146147 - Lazy1 - Thu Nov 29, 2007 5:42 pm

Maybe it's the address of the variable you tried to call as a function in decimal.

#146150 - gmiller - Thu Nov 29, 2007 5:57 pm

0x2380000 = 37224448 ...

#146154 - Peter - Thu Nov 29, 2007 7:12 pm

Hmm ... I thought the compiler doesn't know anyting about addresses where variables are located, only the linker does.
_________________
Kind Regards,
Peter

#146156 - NeX - Thu Nov 29, 2007 7:30 pm

It is using fixed areas of memory for a little bit of a speed boost...
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.