gokalpfirat Posted June 29, 2012 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 }) )
micheal1230 Posted June 29, 2012 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
gokalpfirat Posted June 29, 2012 Author Posted June 29, 2012 I add client_anim.lua to meta and in directory.
TwiX! Posted June 29, 2012 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)
Castillo Posted June 29, 2012 Posted June 29, 2012 Check your meta.xml, put the animation script before your script. E.g:
Castillo Posted June 29, 2012 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 }) )
gokalpfirat Posted June 29, 2012 Author Posted June 29, 2012 Still get same error at line 2 a nill value.
gokalpfirat Posted June 30, 2012 Author Posted June 30, 2012 Sorry for flood but I havent get right answer yet.
CapY Posted June 30, 2012 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.
gokalpfirat Posted June 30, 2012 Author Posted June 30, 2012 My Meta "Script" author="Me" version="1.0" />
Guest Guest4401 Posted June 30, 2012 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:
MTA Team qaisjp Posted June 30, 2012 MTA Team Posted June 30, 2012 "Script" author="Me" version="1.0" />
gokalpfirat Posted June 30, 2012 Author Posted June 30, 2012 Thanks qaisjp and karthik_184 and SolidSnake
Castillo Posted June 30, 2012 Posted June 30, 2012 Thanks qaisjp and karthik_184 and SolidSnake You're welcome.
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