forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

'makems' Error

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Sleepy566



Joined: 28 Dec 2006
Posts: 23

PostPosted: Mon Jan 08, 2007 6:06 am    Post subject: 'makems' Error Reply with quote

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:

Quote:
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:
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;
                     }
         }
Back to top
View user's profile Send private message
onne



Joined: 29 Aug 2006
Posts: 24

PostPosted: Mon Jan 08, 2007 6:28 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sleepy566



Joined: 28 Dec 2006
Posts: 23

PostPosted: Mon Jan 08, 2007 7:05 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
onne



Joined: 29 Aug 2006
Posts: 24

PostPosted: Mon Jan 08, 2007 8:29 pm    Post subject: Reply with quote

??? 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.
Back to top
View user's profile Send private message
Sleepy566



Joined: 28 Dec 2006
Posts: 23

PostPosted: Tue Jan 09, 2007 5:48 am    Post subject: Reply with quote

Thanks for helping, but I figured out the problem.

These two lines were out of place:

Code:
int makems=0;
char fnbuffer[100];


just as you suggested.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group