Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (dBc), 17,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[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
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

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:

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 ....
Re: Undeclared identifier weird error [Re: CyberGhost] #453178
07/10/15 11:55
07/10/15 11:55
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Where exactly do you get the error message, on script 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)?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
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
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
Originally Posted By: Superku
Where exactly do you get the error message, on script compiling?


Yes, while compiling.

Originally Posted By: Superku
Can you write down the exact error message?




Originally Posted By: Superku
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 ....
Re: Undeclared identifier weird error [Re: CyberGhost] #453180
07/10/15 12:47
07/10/15 12:47
Joined: May 2014
Posts: 179
The lit part of the Truth
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
Sorry, it turned out to be a missing-bracket typo grin


Nothing to say ....

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1