Zcraks Posted August 17, 2019 Share Posted August 17, 2019 for k,i in pairs(pickups) do local pickup[k] = createPickup( i[1], i[2], i[3], i[4], i[5], 0) end function onPickupH (thePlayer) for k,v in pairs(pickups) do if source == pickup[k] then local num = k spawnPlayer(thePlayer,num[v][7],num[v][8],num[v][9],-40,getElementModel(thePlayer), v[10],0) end end end addEventHandler("onPickupHit", root, onPickupH) server.Lua:2 unexpected symbol near '[' Link to comment
Moderators IIYAMA Posted August 17, 2019 Moderators Share Posted August 17, 2019 (edited) 41 minutes ago, Zcraks said: server.Lua:2 unexpected symbol near '[' local pickup[k] = createPickup( i[1], i[2], i[3], i[4], i[5], 0) You shouldn't use the local keyword, when you are not declaring a local variable. Edited August 17, 2019 by IIYAMA Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now