|  | 
	
	
		| Serentus Apprentice
 
 
 Joined: 28 Sep 2001
 Posts: 103
 Location: USA
 
 | 
			
			  |  Posted: Fri Feb 27, 2004 7:19 am 
 Default Values for DataRecord variables
 
 |  
				| I'm wanting to keep my defenses in Data Record type variable like this. 
 @Insomnia.State
 @Insomnia.Desire
 @Insomnia.AnotherRecord
 @Insomnia.StillAnother
 etc.
 
 How can I enter a default value for these. I need to have .State and .Desire set to 0 when ever I startup.
 
 I tried putting State=0|Desire=0 and some variations of that but that didn't seem to work.
 |  | 
	
	  |  | 
	
		|  | 
	
		| Timas Novice
 
 
 Joined: 05 Jan 2003
 Posts: 39
 Location: Netherlands
 
 | 
			
			  |  Posted: Fri Feb 27, 2004 12:37 pm 
 |  
				| I've noticed that you need to do "#VAR yourVar.dataField value" if you want to set those fields. So, instead of  "@status = A" do "#VAR status A". 
 After that its ABC, put the two lines below in your atconnect alias and your set.
 
 #VAR Insomnia.state 0
 #VAR Insomnia.desire 0
 |  | 
	
	  |  | 
	
		|  | 
	
		| Serentus Apprentice
 
 
 Joined: 28 Sep 2001
 Posts: 103
 Location: USA
 
 | 
			
			  |  Posted: Fri Feb 27, 2004 1:09 pm 
 |  
				| Thanks for input, but doing the 
 #VAR Insomnia.state 0
 #VAR Insomnia.desire 0
 
 in an alias called by atconnect is what i'm doing now. It's cubersome because there are 8 fields in each variable and 30+ variables. Plus using the Atconnect dosen't run automaticly when i'm working offline.
 
 I was looking for a way to set up default values like you can for normal variables, by filling in the "Default:" Edit box.
 |  | 
	
	  |  | 
	
		|  | 
	
		| Timas Novice
 
 
 Joined: 05 Jan 2003
 Posts: 39
 Location: Netherlands
 
 | 
			
			  |  Posted: Fri Feb 27, 2004 3:09 pm 
 |  
				| I think the default setting is for single string variables.. maybe there is an option but I don't know about it, sorry :) 
 |  | 
	
	  |  | 
	
		|  | 
	
		| nexela Wizard
 
  
 Joined: 15 Jan 2002
 Posts: 1644
 Location: USA
 
 | 
			
			  |  Posted: Fri Feb 27, 2004 4:33 pm 
 |  
				| Atconnect can be called just like a regular alias if thats any help at all :P 
 |  | 
	
	  |  | 
	
		|  | 
	
		| LightBulb MASTER
 
 
 Joined: 28 Nov 2000
 Posts: 4817
 Location: USA
 
 | 
			
			  |  Posted: Thu Mar 04, 2004 9:48 pm 
 |  
				| Create the variable with the desired default values. Then use the following command, at the command line, to insert those values to the Default field. #VAR Insomnia {@Insomnia} {@Insomnia}
 |  | 
	
	  |  | 
	
		|  | 
	
		| Serentus Apprentice
 
 
 Joined: 28 Sep 2001
 Posts: 103
 Location: USA
 
 | 
			
			  |  Posted: Fri Mar 05, 2004 1:05 pm 
 |  
				| Thanks Lightbulb! That did the trick. 
 I was hoping someone would know, and i figured if anyone did, you would. I have seen you use alot of record variables in your posts. That's acually what gave me the idea for using them.
  And they work great. 
 Edit:Typos
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |