Jump to content

setTimer ....


Edikosh9998

Recommended Posts

Posted

Hola,

Estoy intentando PODER hacer bajar una barra cada tantos segundos pero no me esta funcionando. El tema es que yo pongo esto :

function bajarBarra() 
    local player = getLocalPlayer() 
    if player then 
    guiProgressBarSetProgress(gui["progressBar_2"],guiProgressBarGetProgress(gui["progressBar_2"])-50) 
end 
end 
setTimer (bajarBarra,4000,0) 

gui["progressBar_2"] =  guiCreateProgressBar(10, 75, 118, 23, false, gui["_root"]) 
    guiProgressBarSetProgress(gui["progressBar_2"], 100) 

Poniendo la funcion "bajarBarra" , no pasa nada , ni tampoco se va el GUI, ni me aparece un error. Puede ser que necesite algun evento que tenga que activar?

Saludos.

Posted

Pone /debugscript 3 en el juego y postea los errores.

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 (edited)

Attempt to index global "gui" (a nil value)

EDIT : no tenia esa del debugscript jaja

EDIT 2 : YA LO ARREGLE, ERA EL NOMBRE EL PROBLEMA.

Edited by Guest
Posted

Es este todo tu script? si no, postea el resto.

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
Es este todo tu script? si no, postea el resto.

Jaja justo al mismo tiempo. Ahi puse que el problema fue el nombre.

Porque para hacer scripts yo uso el programa que postearon en la seccion "Scripting" ( el que dice QtLua)

Y ese script te pone asi los nombres, entonces el nombre lo deje asi

progressBar_2 

Posted

"gui" tenia que ser una tabla, y en tu script no la tenes.

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.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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