The-R
The One & Only
im pretty new to psp coding on a whole so im having trouble with this bit of code. trying to get the program to only save input that is 25 characters or less and if over 25 print a message to the screen tht tells the user the input shud be 25 characters or less widout the program saving the aforementioned over 25 character message.
if (oslOskIsActive()){
oslDrawOsk(); // starts the osk (Onscreen Keyboard)
if (oslGetOskStatus() == PSP_UTILITY_DIALOG_NONE){
if (oslOskGetResult() == OSL_OSK_CANCEL)
sprintf(message, "Make A Selection....");
}else if
char userText[100] = "";{
oslOskGetText(userText); // enters a record here
}else if (strlen(userText)>25) {
sprintf(message, "note must be 25 characters or less");
oslPrintf(message);
}else if sprintf(message, "P-Note Saved ^_^ %s \n"); { // displays record on the screen
strcat(userText, "\n");
log = writelog(userText); // writes the record to file
}
oslEndOsk();
}
if (oslOskIsActive()){
oslDrawOsk(); // starts the osk (Onscreen Keyboard)
if (oslGetOskStatus() == PSP_UTILITY_DIALOG_NONE){
if (oslOskGetResult() == OSL_OSK_CANCEL)
sprintf(message, "Make A Selection....");
}else if
char userText[100] = "";{
oslOskGetText(userText); // enters a record here
}else if (strlen(userText)>25) {
sprintf(message, "note must be 25 characters or less");
oslPrintf(message);
}else if sprintf(message, "P-Note Saved ^_^ %s \n"); { // displays record on the screen
strcat(userText, "\n");
log = writelog(userText); // writes the record to file
}
oslEndOsk();
}