gokalpfirat Posted June 29, 2012 Share Posted June 29, 2012 I get this error ERROR: bos/client.lua:2: attemp to index global 'Animation'(a nil value) in this script: addEventHandler( "onClientResourceStart", getRootElement( ), Animation.createAndPlay(guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) , { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) ) Link to comment
micheal1230 Posted June 29, 2012 Share Posted June 29, 2012 I get this error ERROR: bos/client.lua:2: attemp to index global 'Animation'(a nil value) in this script: addEventHandler( "onClientResourceStart", getRootElement( ), Animation.createAndPlay(guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) , { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) ) Its trying to export to the animation resource but its not running or there isnt one Link to comment
gokalpfirat Posted June 29, 2012 Author Share Posted June 29, 2012 I add client_anim.lua to meta and in directory. Link to comment
TwiX! Posted June 29, 2012 Share Posted June 29, 2012 function createAnimation() ourImage = guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) Animation.createAndPlay (ourImage, Animation.presets.guiMove ( HERE USE YOUR X ,HERE USE YOUR Y, 2000 ) ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), createAnimation) Link to comment
gokalpfirat Posted June 29, 2012 Author Share Posted June 29, 2012 I dont use gui move i use getSetAlpha Link to comment
gokalpfirat Posted June 29, 2012 Author Share Posted June 29, 2012 Waiting for a good answer Link to comment
Castillo Posted June 29, 2012 Share Posted June 29, 2012 Check your meta.xml, put the animation script before your script. E.g: Link to comment
gokalpfirat Posted June 29, 2012 Author Share Posted June 29, 2012 I check it is same but still. Link to comment
Castillo Posted June 29, 2012 Share Posted June 29, 2012 I had that error too, I fixed it the way I said above. addEventHandler( "onClientResourceStart", resourceRoot, Animation.createAndPlay(guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) , { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) ) Link to comment
gokalpfirat Posted June 29, 2012 Author Share Posted June 29, 2012 Still get same error at line 2 a nill value. Link to comment
gokalpfirat Posted June 30, 2012 Author Share Posted June 30, 2012 Sorry for flood but I havent get right answer yet. Link to comment
CapY Posted June 30, 2012 Share Posted June 30, 2012 local pict = guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) Everything is documented in client_anim. Link to comment
gokalpfirat Posted June 30, 2012 Author Share Posted June 30, 2012 My Meta "Script" author="Me" version="1.0" /> Link to comment
Guest Guest4401 Posted June 30, 2012 Share Posted June 30, 2012 My Meta "Script" author="Me" version="1.0" /> Check your meta.xml, put the animation script before your script.E.g: Link to comment
qaisjp Posted June 30, 2012 Share Posted June 30, 2012 "Script" author="Me" version="1.0" /> Link to comment
gokalpfirat Posted June 30, 2012 Author Share Posted June 30, 2012 Thanks qaisjp and karthik_184 and SolidSnake Link to comment
Castillo Posted June 30, 2012 Share Posted June 30, 2012 Thanks qaisjp and karthik_184 and SolidSnake You're welcome. Link to comment
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