PDA

View Full Version : Getting a strange error in file


Papabard
10-29-2015, 07:12 PM
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
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.