I made a panel to set the settings of my game. There's a function that saves the changes I've made in the settings (sound volume, ... etc.) into a text file. The problem is that the engine says that some variables are 'undeclared identifiers' although they are declared ...

It was working fine all the time ,and that happened when I changed some stuff in another script file that has nothing to do with the settings ....

Here's the function that saves the settings:

Code:
var settings_file_handle; //the problem is not with that variable, it is the next four variables 
var music_volume;
var sfx_volume;
var music_playable;
var sfx_playable;


function save_settings()
{
	
	
	
	settings_file_handle = file_open_write("settings.txt");
	   
	   //window/fullscreen
	   
	   file_var_write(settings_file_handle,video_screen);
	   
	   //Resolution
	   
	   file_var_write(settings_file_handle,video_mode);
	   
	   //MUSIC
	   
	   file_var_write(settings_file_handle,music_playable);
	   file_var_write(settings_file_handle,music_volume);
	   
	   //SFX
	   
	   file_var_write(settings_file_handle,sfx_playable);
	   file_var_write(settings_file_handle,sfx_volume);
	   
	   file_close(settings_file_handle);
}




Thank you and any help will be appreciated

Last edited by CyberGhost; 07/10/15 12:47.

Nothing to say ....