drk Posted February 24, 2012 Posted February 24, 2012 (edited) I'm trying to use Talidan's textlib but when I start the script ( test script ) I get error attempt to index global 'dxText' ( a nil value ). Can someone help me? Client: local sx, sy = guiGetScreenSize() image1 = guiCreateStaticImage((236/800)*sx,(486/600)*sy,(366/800)*sx,(73/600)*sy,"images/grid.png",false) bar1 = guiCreateStaticImage((763/800)*sx,(5/600)*sy,(34/800)*sx,(37/600)*sy,"images/music.png",false) music = dxText:create("ASHUHASUASHUASHUASUHASHU",(246/800)*sx,(520/600)*sy,false) music:color(255,255,255,255) music:scale(0.5) music:postGUI(true) playing = dxText:create("Now playing:",(313/800)*sx,(490/600)*sy,false) playing:color(255,20,147,255) playing:scale(0.6) playing:postGUI(true) Meta.xml: Textlib is in the script. Edited February 24, 2012 by Guest EPT Team Server Development: 0% Learning C++ | C++ is amazing
Castillo Posted February 24, 2012 Posted February 24, 2012 "teste.lua" will load before "textlib.lua" does. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted February 24, 2012 Posted February 24, 2012 (edited) local sx, sy = guiGetScreenSize() addEventHandler( 'onClientResourceStart',resourceRoot, function( ) image1 = guiCreateStaticImage((236/800)*sx,(486/600)*sy,(366/800)*sx,(73/600)*sy,"images/grid.png",false) bar1 = guiCreateStaticImage((763/800)*sx,(5/600)*sy,(34/800)*sx,(37/600)*sy,"images/music.png",false) music = dxText:create("ASHUHASUASHUASHUASUHASHU",(246/800)*sx,(520/600)*sy,false) music:color(255,255,255,255) music:scale(0.5) music:postGUI(true) playing = dxText:create("Now playing:",(313/800)*sx,(490/600)*sy,false) playing:color(255,20,147,255) playing:scale(0.6) playing:postGUI(true) end ) All forgot event onClientResourceStart Edited February 24, 2012 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
drk Posted February 24, 2012 Author Posted February 24, 2012 Thanks Castillo. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Kenix Posted February 24, 2012 Posted February 24, 2012 "teste.lua" will load before "textlib.lua" does. Just use onClientResourceStart. And you can not think of it. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted February 24, 2012 Posted February 24, 2012 Thanks Castillo. You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now