View Single Post
  #3  
Old 06-23-2012, 12:05 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
In your onCreated() function, you are using the equality operator (==) to assign a value. This will not work. When assigning values to variables, use a single equality sign. This also applies to your onPlayerChats() function. Also, since you're setting this.timer (you might want to change the name as well, I bet that's reserved) in onPlayerChats(), it seems a bit redundant to also do that in onCreated().

Next, you'll want to decrement a variable by using either of these two methods:
PHP Code:
this.var--;
this.var -= 1
What you're doing in your timeout will not work. Finally, you should probably check inside your timeout if the countdown has reached zero and, if it has, do not continue the timeout.
Reply With Quote