Countinarray

WhiteEagle

New member
Messages
52
Points
0
Emulator
Gives here in hercules anything what is similar with "countinarray" from rathena?

*countinarray <array name>{[<start index>]},<array name>{[<start index>]};


 I Need this for this part here:
 

Code:
setarray .@gqname$[0],"Kill Mantis","Kill Bees","Kill Soils","Kill Porings";
	.@null$ = "NULL";
	while(countinarray(.@gqname$[0], .@null$) != 2)
		.@gqname$[rand(getarraysize(.@gqname$))] = .@null$;

	switch(select(replacestr(implode(.@gqname$, ":"), .@null$, ""))) {
		case 1:
			mes("mantis");
			close;
		case 2:
			mes("bees");
			close;
		case 3:
			mes("soils");
			close;
		case 4:
			mes("porings.");
			close;
	}
 
Last edited by a moderator:
Thanks Dastgir.
Why is not this basically present in hercules?
Just a question. :D  

PS:
I get now the error message: 

parse_simpleexpr: unmatched ')'


in this line here and the part with "("

Code:
 while(array_count"(".@gqname$,2))
 
Last edited by a moderator:
Back
Top