sprintf(temp_string, "%s/%s.%s", folder_name, game_name, extension_name);
LoadGame(temp_string);
Of course you can't specify directories with gE.
// so wherever you have this (or similar)
text_var = text;
// you have to change it to this
strcpy(text_var, text);
FILE* file = fopen(game_path, "r");
if(file != NULL) // file exists
{
fclose(file);
LoadGame(game_path);
}
else
{
// display the error
}
char temp[30];
sprintf(temp, "%s/%s.%s", game_folder.text, text, game_extension.text);
FILE* file = fopen(temp, "r");
if(file != NULL) // file exists
{
fclose(file);
LoadGame(temp);
}
else
{
// display the error
}
Error Line 5; Unexpected declaration sprintf
char temp[30];
sprintf(temp, "%s/%s.%s", game_folder.text, text, game_extension.text);
{
FILE* file = fopen(temp, "r");
if(file != NULL) // file exists
{
fclose(file);
LoadGame(temp);
}
else
{
// display the error
}
}
Users browsing this forum: No registered users and 1 guest