'makems' Error

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Sleepy566
Posts: 23
Joined: Thu Dec 28, 2006 2:30 am

'makems' Error

Post by Sleepy566 »

When I try to compile my source which uses the makems command to copy some files to the memory stick, I always get this error:
main.c: In function 'main':
main.c:63: error: 'makems' undeclared (first use in this function)
main.c:63: error: (Each undeclared identifier is reported only once
main.c:63: error: for each function it appears in.)
main.c:64: error: 'fnbuffer' undeclared (first use in this function)
It seems that I'm missing some files, but when I checked the pspsdk documentation and other files I couldn't find what I was missing. Anybody know what the problem is?

EDIT:

Here's how I'm trying to use it, maybe this will help?

Code: Select all

while(1) {
          sceCtrlReadBufferPositive(&pad, 1);
          if(pad.Buttons & PSP_CTRL_CIRCLE) {
                       makems=1;
                       sprintf(fnbuffer, "ms0:/systemctrl.prx");
                       copy_file("flash0:/kn/systemctrl.prx", "ms0:/systemctrl.prx");
                       break;
                     }
         }
onne
Posts: 24
Joined: Tue Aug 29, 2006 11:54 pm

Post by onne »

Did you declare the 'makems' somewhere? Why is it there if you don't even use it anywhere? Or should it be a function, then you should add parenthesis?
Sleepy566
Posts: 23
Joined: Thu Dec 28, 2006 2:30 am

Post by Sleepy566 »

I'm sure it's not a function, so it doesn't need parenthesis. I'm not sure if I declared it though... what does that look like? (I'm working with other people so it's not entirely my project)
onne
Posts: 24
Joined: Tue Aug 29, 2006 11:54 pm

Post by onne »

??? as it seems you are putting an integer value in to the variable, you could do it with:

int makems;

??? is that _really_ what you were asking...??? doesn't make any sense with the piece of code you provided though, as you never seem to use the variable. Or maybe you do in the copy_file function, so some info about variables actual usage might be helpful. also I cannot see why you do setup the 'fnbuffer', if you don't use it either... or maybe they are some global variables. hmm.
Sleepy566
Posts: 23
Joined: Thu Dec 28, 2006 2:30 am

Post by Sleepy566 »

Thanks for helping, but I figured out the problem.

These two lines were out of place:

Code: Select all

int makems=0;
char fnbuffer[100];
just as you suggested.
Post Reply