LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Lua Programming Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=50)
-   -   Getting a strange error in file (https://www.lotrointerface.com/forums/showthread.php?t=3587)

Papabard 10-29-2015 07:12 PM

Getting a strange error in file
 
get something about value returning nil. Tried to duplicate however it wouldn't do it again

the error is in this function

startsWith = function(self, piece)
return string.sub(self, 1, string.len(piece)) == piece
end
rawset(_G.string, "startsWith", startsWith)

Thurallor 11-02-2015 07:39 AM

Quote:

Originally Posted by Papabard (Post 11712)
get something about value returning nil. Tried to duplicate however it wouldn't do it again

the error is in this function

startsWith = function(self, piece)
return string.sub(self, 1, string.len(piece)) == piece
end
rawset(_G.string, "startsWith", startsWith)

Well you're not giving me much to go on, but that function would generate an error message if the "piece" argument is nil. Example:
str = "blah";
piece = nil;
Turbine.Shell.WriteLine(tostring(str:startsWith(pi ece)));

Papabard 11-08-2015 04:36 PM

yeah I couldn't ever get it to error again. Think it was a first run thing will remove the plugin and reinstall it to see if that triggers it again.


All times are GMT -5. The time now is 02:51 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI