| View previous topic :: View next topic |
| Author |
Message |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Mon Jan 08, 2007 6:06 am Post subject: 'makems' Error |
|
|
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 |
|
 |
onne
Joined: 29 Aug 2006 Posts: 24
|
Posted: Mon Jan 08, 2007 6:28 am Post subject: |
|
|
| 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 |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Mon Jan 08, 2007 7:05 am Post subject: |
|
|
| 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 |
|
 |
onne
Joined: 29 Aug 2006 Posts: 24
|
Posted: Mon Jan 08, 2007 8:29 pm Post subject: |
|
|
??? 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 |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Tue Jan 09, 2007 5:48 am Post subject: |
|
|
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 |
|
 |
|