AddOns
AddOn Manager
Latest 200
Browse
Upload AddOn
Search AddOns
Projects
Author Portals
Git Repositories
SVN Repositories
Options
Email Feeds
Preference
Download History
News
Forums
New posts
Today's Posts
Search Forum
Categories
General
AddOns, Comps, Macros
Featured Projects
Developer
Site Forums
Mark Forums Read
Subscribed Threads
Open Buddy List
Members List
Help
Login
Sign up
WoWInterface
»
Developer Discussions
»
Lua/XML Help
»
If (numeric variable) increases, do (action)?
Go to Page...
Reply
View First Unread
Thread Tools
Display Modes
11-30-09, 07:35 AM
#
1
Amenity
Guest
Posts: n/a
If (numeric variable) increases, do (action)?
(Please keep in mind...I'm more of a code monkey hack than a true programmer. Also, I tried searching and came up with nil.)
Let's say I have variable HUMANS, which is a list of players that's updated whenever EVENT occurs. I have action ACTION that does "stuff".
Basically what I want is this:
If #HUMANS increased when EVENT happened, then ACTION
If #HUMANS decreased, or remained the same, then NIL
Exactly how would one go about that?
Amenity
11-30-09, 07:51 AM
#
2
haste
Featured Artist
Join Date: Dec 2005
Posts: 1,027
lua Code:
local
HUMANS
=
1
function
(
self, event, newValue
)
if
(
newValue
>
HUMANS
)
then
-- Do stuff
end
end
__________________
「貴方は1人じゃないよ」
haste
View Public Profile
Send a private message to haste
Visit haste's homepage!
Find More Posts by haste
Reply
WoWInterface
»
Developer Discussions
»
Lua/XML Help
» If (numeric variable) increases, do (action)?
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off