View Single Post
  #2  
Unread 11-02-2015, 07:39 AM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 202
Quote:
Originally Posted by Papabard
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)));

Last edited by Thurallor : 11-02-2015 at 08:02 AM.
Reply With Quote