I have a weird problem that I couldn't understand,Below is my code,When I query a particular index of a string using string this is working but when I tried this inside a foreach loop It is not working with a variable(pawn i.e iteration number )
Could someone please explain me what Im doing wrong.
string files = 'abcdefgh'; //s@fileN = files[0] //this is working int pawnList[]; if (s@pieceName == "pawn"){ pawnList = expandpointgroup(0, "*"); foreach (int pawn ; pawnList){ //s@g = files[0] // this is working s@g = files[pawn]; // this is not working //@P = detail(1, sprintf("%s%i",(x[@g],2))); } } Thanks a lot in advance!