Trying to Call an arg?

I’m using the Pointmod and im trying to call(or whatever) v[7]

v[7] = [lua]function( ply )
SafeRemoveEntity( ply.Trail )
ply.Trail = util.SpriteTrail( ply, 0, Color(255,255,255), false, 15, 1, 4, 1/(15+1)*0.5, “trails/plasma.vmt”) [/lua]

This is what i tried(also a few other things)
[lua]concommand.Add( “ps_set”, function( ply, cmd, args )
local item = args[1]
if !item then return end
for k, v in ipairs( PointMod.Items ) do
if v[4] == item then
if ply:HasItem( item ) then
v[7]
ply:ChatMessage( “You have set the “” … v[1] … “” This item will bet set after you respawn!” )
end
end
end
end)[/lua]
it will give me this


PointMod/sv/buy.lua:45: '=' expected near 'ply'

Any idea how to fix this?

[lua]v7[/lua]

Thanks it fixed that problem now i got another one
Now when i click the item it gives me this error:


PointMod/sh/items.lua:8: attempt to index local 'ply' (a nil value)

[lua]PointMod.Items = { }

PointMod.Items[1] = { “Plasma Trail”, “Sets an Plasma trail after you respawn”, “models/props_junk/wood_crate001a.mdl”, “plasma1”, 50, “PlayerSpawn”, function( ply )
SafeRemoveEntity( ply.Trail )
ply.Trail = util.SpriteTrail( ply, 0, Color(255,255,255), false, 15, 1, 4, 1/(15+1)*0.5, “trails/plasma.vmt” )
end }
PointMod.Items[2] = { “Laser Trail”, “Sets an Laser trail after you respawn”, “models/props_junk/wood_crate001a.mdl”, “laser1”, 50, “PlayerSpawn”, function( ply )
SafeRemoveEntity( ply.Trail )
ply.Trail = util.SpriteTrail( ply, 0, Color(255,255,255), false, 15, 1, 4, 1/(15+1)*0.5, “trails/laser.vmt” )
end }[/lua]

When you call the function, you need to pass the player object.

[lua]v7[/lua]

Thank you.