evolve plugin

So I’m making an evolve plugin that requires a player’s name. And so I’m trying to get the arguments of the chat command by doing this:

[lua]
function PLUGIN:GetArguments( str )
local args = {}
for arg in string.gmatch( str, ‘"([^"]+)"’ ) do
table.insert( args, arg )
end
return args
end

function PLUGIN:Call( ply, _, argstr )
local args
if ( argstr ) then
args = self:GetArguments( argstr )
else
args = _
end
if ( #args == 0 ) then
evolve:Notify( ply, evolve.colors.red, “You haven’t specified a player!” )
end
[/lua]

but for some reason it’s not finding the arguments. It just keeps saying “You haven’t specified a player!”

[lua]if ( #args == 0 ) then[/lua]
What the fuck is that? are the args a string or a table?

I honestly don’t know. I got this from the “vote” plugin and changed it. Except for some reason it doesn’t now and it’s the same exact code.

Well, lemme try to clean this up a bit then get back to you

[editline]a[/editline]
[lua]function PLUGIN:Call( ply, _, argstr )
local args
if ( argstr ) then
local argtb = string.Explode(argstr, " ")
args = argtb
elseif (argstr == nil) or (argstr == “”) then
evolve:Notify( ply, evolve.colors.red, “You Haven’t Specified a Player!”)
else
args = nil
end
end[/lua]

and if you want the get arguments feature:
[lua]function PLUGIN:GetArguments( str )
return string.Explode(str, " ")
end[/lua]