Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump plugin does not support infinite maps (layer chunks) #277

Open
Bulba413 opened this issue May 2, 2023 · 6 comments
Open

bump plugin does not support infinite maps (layer chunks) #277

Bulba413 opened this issue May 2, 2023 · 6 comments

Comments

@Bulba413
Copy link

Bulba413 commented May 2, 2023

Error

sti/plugins/bump.lua:73: bad argument #1 to 'ipairs' (table expected, got nil)

Traceback

[C]: in function 'ipairs'
sti/plugins/bump.lua:73: in function 'bump_init'
main.lua:52: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

all code related to sti or bump before this point:

local sti = require "sti"

local bump = require "bump"

local world = bump.newWorld(16)
map = sti("assets/testmap.lua", { "bump" })
map:bump_init(world)
@Bulba413 Bulba413 changed the title unsure what causd this error unsure what caused this error May 3, 2023
@karai17
Copy link
Owner

karai17 commented May 4, 2023

it looks like your layer.data field is nil. Do yu have any tile layers that don't have a data field?

@Bulba413
Copy link
Author

Bulba413 commented May 6, 2023

i don't think so? i'm not sure where the data field would go exactly

@karai17
Copy link
Owner

karai17 commented May 6, 2023 via email

@Bulba413
Copy link
Author

Bulba413 commented May 6, 2023

@karai17
Copy link
Owner

karai17 commented May 7, 2023

Ah, I see the issue. your map is set up with an infinite map so instead of layer.data it has layer.chunks[...].data and it looks like the bump plugin doesn't currently support this. you can change your map settings so that it is a fixed size rather than infinite.

image

@karai17 karai17 changed the title unsure what caused this error bump plugin does not support infinite maps (layer chunks) May 7, 2023
@carld
Copy link

carld commented May 31, 2023

Coincidentally today I changed my map from infinite to fixed and discovered that this was the root cause, and I'd handled it by changing the plugin code locally and mistakenly thought it was due to a change in the file format and created PR #276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants