I try to list a series of variables

Sdator

New member
When I use getglobalvar, getlocalvar, getscriptvar, openborconstant, openborvariant.. While waiting for the method, I wonder if there is a way to list all the unknown values. :(

Listglobalvar, listlocalvar, list... ;D



You might say that the varname related to openborconstant and openborvariant can be found in the wiki, but I think you misunderstood me. I just want to enumerate the values of the game's built-in and unknown variables from my program by some means, and then pass them to the string handler to filter out the content I want. :)



This is a personal guess, and I think it's a quick way to get something interesting out of a game. Perhaps the above statement will make you misunderstand, I am using the translation software. ;D
 
There is no built in variable dump, sorry. You will have to build an iterator from 0 to whatever your maximum # of variables is.

DC
 
Damon Caskey said:
There is no built in variable dump, sorry. You will have to build an iterator from 0 to whatever your maximum # of variables is.

DC
Thanks for your reply, yeah, I tried using enumeration, but I got a bunch of "<VT_EMPTY> Unitialized".

I noticed the cause of the problem, getxxxvar requires you to pass string parameters, and I use Arabic numerals to iterate, so I can't get the relevant values, but I don't know what those string values are built in, so I can't enumerate, I think I may need to prepare a dictionary in advance for enumeration, which will be a lot of work and time consuming. :(
If so, can you write a case? This will help me a lot, please.

Here is an example of the code I used to test the enumeration:

Code:
	@script
		void self = getlocalvar("self");
		int i;
		for(i=0;i<1000;i++){
			void x = getindexedvar(i);
			void y = getlocalvar(i);			
			void z  = getentityvar(self,i);
			log(i + ":" + x + ":" + y + ":" + z +"\n");
                        // 1-999:<VT_EMPTY>   Unitialized:<VT_EMPTY>   Unitialized:<VT_EMPTY>   Unitialized 
		}
	@end_script
 
Back
Top Bottom