View Full Version : String.Find has a BUG
alexsander_sc_br
10-16-2007, 07:06 AM
String.Find and String.ReverseFind have a BUG.
result = String.ReverseFind("SR123456789BR&123&435", "&", false);
This code generates an error: attempt to index a string value.
Any suggestion?
I tried to convert a string to a table.
The function DelimitedStringToTable does not Work because String.Find has a BUG.
My OS is Windows XP SP2, all updates, AMD Mobile Sempron 3100.
Thanks
Brett
10-16-2007, 08:36 AM
Thanks for the report. We will look into that. REF: 16663
Lorne
10-16-2007, 10:28 AM
For the record, it works fine here. (Returns 18.)
longedge
10-16-2007, 10:43 AM
Same here and String.Find returns 14.
What other code is there, must be that that's causing the error.
Dermot
10-16-2007, 10:46 AM
Works fine here too, returns 18.
leebos
10-18-2007, 07:38 AM
Worke here, reverse = 18 normal = 14, no errors.
alexsander_sc_br
10-18-2007, 08:01 AM
Hi.
The problem happend when a used a variable called "string".
leebos
10-18-2007, 08:17 AM
You are correct, if "string" is used as a variable the first run is ok but the second run produces "Error, attempt to index a number value"
Lorne
10-18-2007, 10:12 AM
"string" is the name of a table containing string functions in Lua (some of which are used by the String actions in AutoPlay, including String.Find).
If you use "string" as a variable name you remove access to the built-in Lua string functions.
alexsander_sc_br
10-19-2007, 06:54 AM
OK, sorry. My mistake.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.