Josh64

attempt to call a nil value (global 'tablelength')

Jan 1st, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. elseif roomType == RoomType.ROOM_DEVIL then
  2. local devilPool = {67,113,163,187,268,269,275,360,412,417,431,433,468,519}
  3. for z = 1, #entities do
  4. local entity = entities[z]
  5. if entity.Type == EntityType.ENTITY_PICKUP
  6. and entity.Variant == PickupVariant.PICKUP_COLLECTIBLE then
  7. -- look for a familiar from the devil pool
  8. for x = 1, tablelength(devilPool), 1 do
  9. if entity.SubType == devilPool[x] then
  10. local itemRng = player:GetCollectibleRNG(devilPool[x])
  11. local bumRoll = itemRng:RandomInt(100)
  12. if bumRoll < bumChance then
  13. -- spawn a dark bum
  14. entity:ToPickup():Morph(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_DARK_BUM, true)
  15. end
  16. end
  17. end
  18. end
  19. end
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment