Cycling through a Where / Pawn query?

Grem

Active Member
Can anyone tell me the proper way to cycle through results in a 'Where' query? It seems that Pawn is designed to only return one result, correct? But I need a way to iterate through Pawns. Is there a way to include multiple 'notid' parameters?

Thanks in advance,
Grem
 

Amadeus

The Maestro
Staff member
As of the next release, you can cycle with something like this:
Code:
function main()
{
	
	  variable int i = 1
	  
	  do
	  {
	  	  echo ${i}. ${Pawn[${i}].Name}
	  }
	  while ${i:Inc} <= ${VG.PawnCount}
	  
}
Of course, it's not a static array, but should actually work for most purposes. I'm working on a better solution for isxvg for a 'snapshot' array other than the 'customactorarray' that I used with isxeq2.
 
Top Bottom