Discord
Login
Community
DARK THEME

I need help with this code for the map

local mapPos = (example_scene).tilePos(mouse.x, mouse.y) local screenPos = (example_scene).screenPos(mapPos[0], mapPos[1]) local sprite = (maps.example_scene).get(mapPos[0], mapPos[1])

screen.clear("rgb(49,114,147)")

if sprite and not buyButton.hover then
  local text = tileNameMap[sprite] or sprite
  screen.drawText(text, -130, 80, 10, "rgb(255,255,255)")
end

example_scene.draw()

screen.setAlpha(0.3)
if not buyButton.hover then
  screen.fillRect(screenPos[0], screenPos[1],
    examplescene.tileWidth(), examplescene.tileHeight())
end

I don't know what it is but it keeps showing a blue screen and telling me that the map is not defined

show projekt code ( make projekt public ) .

it is

it is called public collab

Heres a link to the code https://microstudio.dev/projects/adventuregameidk/code/

you must change setting in project . Click button "Make public" .

Then You see link to project .

it is public

https://microstudio.io/i/Loginus/minimal64/

this is what the public link to the project looks like

I did the project is titled public collab it is a collaborative project I joined

https://microstudio.dev/i/kange99/thecollab/

does this one work

correct name variable is : "exampleScene" - that you definied in frameGame.init() .

You used name like:

  • "example_scene"
  • "examplescene"

Perform variable name fix.

File "games/farm" line - 42, 43, 44, 53, 58.

thank you

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community