array sample
TileData[15] = "NDN1N2N3N4"
TileData[16] = "NDN1N2N3"
TileData[17] = "NDN1N2N4"
TileData[18] = "NDN1N3N4"
TileData[19] = "NDN2N3N4"
TileData[20] = "N1N2N3N4"
TileData[21] = "N1N2N4"
TileData[22] = "RD"
TileData[23] = "ND"
TileData[24] = "N1"
TileData[25] = "N2"
search code
d$ = ""
a$ = ""
b$ = ""
c$ = ""
e$ = ""
if x = 8 then dt = !dt //toggle deathnote
if x = 9 then at = !at //toggle 1 note
if x = 10 then bt = !bt //toggle 2 note
if x = 11 then ct = !ct //toggle 3 note
if x = 12 then et = !et //toggle 4 note
if dt = -1 then d$ = "ND"
if at = -1 then a$ = "N1"
if bt = -1 then b$ = "N2"
if ct = -1 then c$ = "N3"
if et = -1 then e$ = "N4"
temp$ = (d$+a$+b$+c$+e$)
search$ = temp$
tile = TileData.find(search$)+1
print(str(tile))
Before anyone asks, ND, N1 N2 etc indicate NOTE D, NOTE 1, NOTE 2 etc... there are entries in the array that are just "1" "2" "3" etc..
There's something WRONG here, and I can't find it. It works IF I'm searching for "ND", "N1", "N2", "N3", or "N4". However the moment I add another entry, it spits it back and says not there. also ND sometimes works, and sometimes doesn't. It's incredibly frustrating to have a problem that doesn't appear to be a problem anywhere, especially a bug that is intermittent and random with the same code.