Jump to content

Recommended Posts

Posted

Began to deal with lua looked lessons (http://www.leadwerks.com/werkspace/page/tutorials/_/getting-started-with-leadwerks-r8) and encountered this error message as pictured tested concentration with what seems to me a lesson all right

local pos -- обьявление локальной переменной
function App:Start()
--название в правом углу
self.title="1_начало"
--создаем акно
self.window=Window:Create(self.title)
self.window:HideMouse()
--графическая часть
self.context=Context:Create(self.window,0)
if self.context==nil then return false end
--Создает мир
self.word=World:Create()
pos=Vec3(2, 2)
return true
end
function App:Loop()
--If window has been closed, end the program
if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end
pos.x=pos.x+(1*Time:GetSpeed())-- обновление х координаты
---обновление приложения современем
Time:Update()
---обновление мира
self.world:Update()
---рендер мира
self.world:Render()
self.context:Clear();
---ресуем жолтый квадрат
self.context:SetColor(120,255,0)
self.context:DrawRect(0,0,256,256)
------text
self.context:SetColor(0,255,0)
self.context:SetBlendMode(Blend.Alpfa)
self.context:DrawText("Hello world",pos.s,500)
self.context:SetBlendMode(Blend.Solid)
---цвет фона
self.context:SetColor(0,0,0)
--обновление экрана
self.context:Sync()
---
return true
end

9bOuDi81.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...