Jump to content

Error help.


Recommended Posts

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
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
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

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
Guest Guest4401
My Meta
"Script" author="Me" version="1.0" /> 

Check your meta.xml, put the animation script before your script.

E.g:

    

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...