Lua Programming Question(s)

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » Lua Programming Question(s)
Lua Programming Question(s)
 Bahamut.Krizz
Offline
Server: Bahamut
Game: FFXI
user: Krizz
Posts: 3158
By Bahamut.Krizz 2013-04-12 23:31:11
Link | Quote | Reply
 
While attempting to use lines of code like
Code
local splat = split(curline,' ')
and
Code
local splitarr = split(term,' ')

I receive an ingame error of
Code
attempt to call global 'split' (a nil value)


Any suggestions?
 Bahamut.Krizz
Offline
Server: Bahamut
Game: FFXI
user: Krizz
Posts: 3158
By Bahamut.Krizz 2013-04-13 06:41:38
Link | Quote | Reply
 
Bah, nevermind. Was a lack of sleep mistake. I completely overlooked the split function defined in the other addons I use for reference.
 Phoenix.Suji
Offline
Server: Phoenix
Game: FFXI
user: suji
Posts: 962
By Phoenix.Suji 2013-04-13 15:30:36
Link | Quote | Reply
 
There's another one that's a bit more general defined in the stringhelper library which you can access with
Code
require 'stringhelper'
...
segments = string.split(str, sep)

It can take a couple of other arguments as well, but you probably don't need them.
Log in to post.