6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible),
17,577
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[SOLVED] - Undeclared identifier weird error
#453177
07/10/15 11:26
07/10/15 11:26
|
Joined: May 2014
Posts: 179 The lit part of the Truth
CyberGhost
OP
Member
|
OP
Member
Joined: May 2014
Posts: 179
The lit part of the Truth
|
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:
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 ....
|
|
|
Re: Undeclared identifier weird error
[Re: Superku]
#453179
07/10/15 12:35
07/10/15 12:35
|
Joined: May 2014
Posts: 179 The lit part of the Truth
CyberGhost
OP
Member
|
OP
Member
Joined: May 2014
Posts: 179
The lit part of the Truth
|
Where exactly do you get the error message, on script compiling? Yes, while compiling. Can you write down the exact error message?  Do you have the variables declared before the function like in your post (maybe you have two save_settings() functions in your script)? Yes, it is. I have only one function. Btw., everytime I comment out the line that uses the variable, it tells me that another one is undeclared identifier. And then I comment it out, then it tells me that the panel itself (that was actually defined before the function too) is undeclared. I re-installed 3DGS ,but the problem persists. I have A8 v8.10.3 btw.
Nothing to say ....
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|