05-21-2024, 01:49 PM
(This post was last modified: 05-21-2024, 02:33 PM by Yetoduiburit.)
im trying something like this..
the goal is to drop loot on ground depending on which place i am.
i get in console LUA Script -> drop items: 18: global 'tileshootable' is not callable (a nil value)
why? is there a better way to write this code?
keep in mind the moveitems part works flawlessly, which means that the values i assigned to LOCATION variables are working.
the goal is to drop loot on ground depending on which place i am.
if tileshootable(LOCATION5.X,LOCATION5.Y,LOCATION5.Z) then
for _, item in ipairs(ITEMS_DROP) do
if itemcount(item) > 0 then
moveitems(item, ground(LOCATION5.X,LOCATION5.Y,LOCATION5.Z), '', 100)
wait(173, 251)
end
end
end
if tileshootable(LOCATION50.X,LOCATION50.Y,LOCATION50.Z) then
for _, item in ipairs(ITEMS_DROP) do
if itemcount(item) > 0 then
moveitems(item, ground(LOCATION50.X,LOCATION50.Y,LOCATION50.Z), '', 100)
wait(173, 251)
end
end
end
if tileshootable(LOCATION6.X,LOCATION6.Y,LOCATION6.Z) then
for _, item in ipairs(ITEMS_DROP) do
if itemcount(item) > 0 then
moveitems(item, ground(LOCATION6.X,LOCATION6.Y,LOCATION6.Z), '', 100)
wait(173, 251)
end
end
end
if tileshootable(LOCATION7.X,LOCATION7.Y,LOCATION7.Z) then
for _, item in ipairs(ITEMS_DROP) do
if itemcount(item) > 0 then
moveitems(item, ground(LOCATION7.X,LOCATION7.Y,LOCATION7.Z), '', 100)
wait(173, 251)
end
end
end
if tileshootable(LOCATION70.X,LOCATION70.Y,LOCATION70.Z) then
for _, item in ipairs(ITEMS_DROP) do
if itemcount(item) > 0 then
moveitems(item, ground(LOCATION70.X,LOCATION70.Y,LOCATION70.Z), '', 100)
wait(173, 251)
end
end
end
i get in console LUA Script -> drop items: 18: global 'tileshootable' is not callable (a nil value)
why? is there a better way to write this code?
keep in mind the moveitems part works flawlessly, which means that the values i assigned to LOCATION variables are working.