Jump to content

text inside a label moves from right to left?


Recommended Posts

Now i have a another question :lol:

I tried now very long with the differents way to get the script restarts after a time.

Because i want that the random text comes from time to time...

Here is one from many ways i tried:

... 
  
setTimer ( 
    function stufftest() 
     ... 
     ... 
    end 
, 120000, 0) 
  
... 

But it don´t work, i still get this error: http://b.imagehost.org/0436/hmmm.png

Also i don´t know that the script loads a new node from the xml file when a timer launch them again?

Can anybody help me?

Link to comment

sorry xetaquake this is off topic but do you have msn ?

also about the showing every other time, write to xml howmany times a player has opend the gui and on the 3rd one show the immage, that way when the gui is open the other 2 times it wont show and then re-write in the xml "0" u get me ? basically check the xml for the players name and if it == 3 then show the scrolling lable else dont show it and add 1 to whats in the xml

Link to comment
Hi,

then i get this error:

attempt to call global stufftest (a nil value)

And the functions are don´t to see ingame

stufftest() is just an example to show you what to do. You can show or hide the window using guiSetVisible func. You can change its text too, using guiSetText func.

Link to comment
setTimer (stufftest(), 120000, 0) 
  
function stufftest() 
outputChatBox("stuff test function") 
end 
  

You don't use brackets when you call a function using timer.:

setTimer (stufftest, 120000, 0) 
  
function stufftest() 
outputChatBox("stuff test function") 
end 
  

Link to comment

I already tried it to add the function name directly in the setTimer, but then i get everytime a "bad argument @ setTimer" error.

So i learned it to copy the complete function in a seTimer...but this don´t work too on my script (but on all others) :lol:

Is there any eventHandlers to restart the script? I was searching for client-side Events in the wiki, but found nothing :?:

Link to comment
I already tried it to add the function name directly in the setTimer, but then i get everytime a "bad argument @ setTimer" error.

So i learned it to copy the complete function in a seTimer...but this don´t work too on my script (but on all others) :lol:

Is there any eventHandlers to restart the script? I was searching for client-side Events in the wiki, but found nothing :?:

Timers are useful and you must know how to use it. As Lua is typeless language you must check if variable/param is that what it should be. First, scripts gets executed from top to the bottom, from left to right. In the example above you call a function that does not exist at the time you call it. It will also happen if you addEvent AFTER you attach a function to it.

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