Jump to content

Error help.


Recommended Posts

Posted

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

mtaubluascripter.png
Posted
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

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

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

Posted

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

E.g:

    

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local pict = guiCreateStaticImage(20, 200, 100, 100, "bos.png", false) 
Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) 
  

Everything is documented in client_anim.

Guest Guest4401
Posted
My Meta
"Script" author="Me" version="1.0" /> 

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

E.g:

    

Posted
Thanks qaisjp and karthik_184 and SolidSnake

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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