Szerző Téma: GUi-attempt call  (Megtekintve 576 alkalommal)

GUi-attempt call
« Dátum: 2014. Szeptember 13. - 08:39:16 »
0
Hello Carlos tutorial videóját néztem és kaptam egy ilyen hibát: attenot to call global \"guiGetScreenSize\"(a nil valaue)
LUA:
function tut1()
    screenWidth, screenHeight = guiGetScreenSize()
windowWidth, WindowHeight = 300, 400
x = (screenWidth/2) - (windowWidth/2)
y = (screenHeight/2) - (windowHeight/2)
tut = guiCreateStaticImage(x, y, 300, 400, \"tut.png\", false)
showCursor(true)
gomb1 = guiCreateLabel(10, 350, 120, 60, \"test\", false, tut)
gomb2 = guiCreateLabel(177, 350, 120, 60, \"asd\", false, hatter)
addEventHandler(\"onClientGUIClick\", gomb1, gombteszt, false)
addEventHandler(\"onClientGUIClick\", gomb2, bezaras, false)
end
addCommandHandler(\"tut1\", tut1)
function teszt()
outoutChatBox(\"Jó helyen van\")
end
function bezaras()
showCursor(false)
guiSetVisible(hatter, false)
end
META:
<meta>
  <script src=\"client.lua\" />
  <file src=\"tut.png\" />
</meta>

Carlos

  • Vendég
GUi-attempt call
« Válasz #1 Dátum: 2014. Szeptember 13. - 09:51:37 »
0
Hy, mivel nem adtad meg a script típusát meta-ba. Az alap értelmezett a server, tehát server oldali a client.lua fájlod...
 
<script src=\"client.lua\" type=\"client\" />

GUi-attempt call
« Válasz #2 Dátum: 2014. Szeptember 13. - 13:48:57 »
0
Kösz carlos én voltam a hülye :D \"zárom\"

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal