Szerző Téma: Export funkció  (Megtekintve 1117 alkalommal)

Nem elérhető mida

Export funkció
« Dátum: 2015. Szeptember 01. - 23:41:29 »
0
Sziasztok! Egy kis problémám támadt. Valamiért nem tudom megcsinálni azt hogy exportáljon egy funkciót.
Azt akarom hogy errre az itemre nyitodjon meg a pc.
 
elseif(item==68)then
exports[\"eg_windows\"]:toggleMonitor

 
pc megjelenési kódok:
 
function toggleMonitor()
if(not mutat)then
mutat = true
loading = math.random(1,10)
else
mutat = false
end
setElementData(getLocalPlayer(), \"opendashboard\", mutat)
end

 
Debugscript:
 
ERROR: eg_item/useItem.lua:18 call: failed to call \'eg_windows:toggleMonitor\' [string \"?\"]

 
Próbálkoztam angyon sok módon sehogy se ment.

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Export funkció
« Válasz #1 Dátum: 2015. Szeptember 02. - 00:13:49 »
0
nem értek olyan jól MTA szkripteléshez, de lehetséges igazam lesz mivel hasonló mint a pawno..
 
function toggleMonitor()

 
helyett így próbáld
 
function toggleMonitor( mutat )

 
Ha hülyeség akkor törölni fogom, de egy próbát megér.  :)

Nem elérhető mida

Export funkció
« Válasz #2 Dátum: 2015. Szeptember 02. - 02:10:23 »
0
nem jó :( de azért köszi

Export funkció
« Válasz #3 Dátum: 2015. Szeptember 02. - 07:07:08 »
0
először is
 

exports[\"eg_windows\"]:toggleMonitor() -- zárójel kell mögé

 
másodszor exportáltad a meta xmlbe ezt a funkciót? :D

Nem elérhető mida

Export funkció
« Válasz #4 Dátum: 2015. Szeptember 02. - 14:09:45 »
0
Úgy van csinálva + exportálva van metaba is

Nem elérhető Xenius

  • 668
    • Profil megtekintése
Export funkció
« Válasz #5 Dátum: 2015. Szeptember 02. - 17:32:52 »
0
<export function=\"wasd\" type=\"client\"/>
exports.eg_windows:toggleMonitor()

Nem elérhető mida

Export funkció
« Válasz #6 Dátum: 2015. Szeptember 03. - 11:45:17 »
0
még mindig nem jó  :\'(

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal