Browse Source

change the value for detecting numeric element from -999 to -2147483648 and one minor change

rachels 3 years ago
parent
commit
9b6d57acd1
1 changed files with 5 additions and 5 deletions
  1. 5 5
      locations/shortgs.qsrc

+ 5 - 5
locations/shortgs.qsrc

@@ -464,8 +464,9 @@ end
 
 !! this function returns the numeric index of the array element which is indexed by string value.
 !! call func('shortgs', 'get_me_index', 'name of array','string index')
-!! the array can be both numeric or string: Be aware, for the search is used the value 'SearchTag' for string arrays and -999 for numeric arrays.
+!! the array can be both numeric or string: Be aware, for the search is used the value 'SearchTag' for string arrays and -2147483648 for numeric arrays.
 !! if the array consists such value, the fuction can mess the array content and return wrong value
+!! changed the value for detecting numeric element from -999 to -2147483648 (November 2020)
 if $ARGS[0] = 'get_me_index':
 	$test = '<<$ARGS[1]>>[''<<$ARGS[2]>>'']'
 	testas0 = arrsize('<<$ARGS[1]>>')
@@ -486,13 +487,13 @@ if $ARGS[0] = 'get_me_index':
 		end
 	else
 		temp=dyneval('result=<<$test>>')
-		dynamic '<<$test>> = -999'
+		dynamic '<<$test>> = -2147483648'
 		testas1 = arrsize('<<$ARGS[1]>>')
 		if testas0 = testas1:
 			if Enable_Android = 1:
-				res = dyneval('result = arrpos(''<<$ARGS[1]>>'',-999,0)')
+				res = dyneval('result = arrpos(''<<$ARGS[1]>>'',-2147483648,0)')
 			else
-				res = dyneval('result = arrpos(0,''<<$ARGS[1]>>'',-999)')
+				res = dyneval('result = arrpos(0,''<<$ARGS[1]>>'',-2147483648)')
 			end
 			dynamic '<<$test>> = <<temp>>'
 		else
@@ -587,7 +588,6 @@ if $ARGS[0] = 'testsize':
 	arrsize('npc_Pavrep')
 	arrsize('npc_pubes')
 	arrsize('npc_punch')
-	arrsize('npc_Qstlvl')
 	arrsize('npc_QW')
 	arrsize('npc_rel')
 	arrsize('npc_run')