Hallo,
ich beschäftige mich seit gestern mit lua und wollte einfach mal das store.png auf den Bildschrim zaubern. Allerdings bekomme ich bei folgendem Code immer den Error: "Error: Can't load resource: store.png". Die store.png befindet sich natürlich im gleichen Vz wie die lua. Wäre cool wenn mir jemand einen Tipp geben könnte.
[lua]print(" TestMod loaded");
TestMod = {};
function TestMod:loadMap(name)
overlayId = createImageOverlay("store.png");
print("Die overlay id ist "..overlayId);
end;
function TestMod:deleteMap()
end;
function TestMod:mouseEvent(posX, posY, isDown, isUp, button)
end;
function TestMod:keyEvent(unicode, sym, modifier, isDown)
end;
function TestMod:update(dt)
end;
function TestMod:draw()
renderText(0.835, 0.610, 0.021, "Works gut");
end;
addModEventListener(TestMod);
[/lua]
mfg Jojo