Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 02-01-2011, 03:56 AM
Cloven Cloven is offline
Delteria
Cloven's Avatar
Join Date: Dec 2006
Location: Florida, United States
Posts: 542
Cloven has a spectacular aura about
Send a message via AIM to Cloven
Quote:
Originally Posted by Tigairius View Post
I agree here, usually events only start with "onMyFunction." If it's simply a method to purchase an item you should be using "function purchaseItem" instead of "function onPurchaseItem" unless you trigger the event from trigger() or a scheduleevent(). Naming a function with the prefix of "on" basically is saying you don't expect a return value.
I generally agree, though I don't think it's a big deal really...

Some people prefix their functions in that fashion for added readability. This is largely because many jerks create unintuitive names for functions, or their code is haphazardly styled. In those cases the 'Find' feature can be rendered almost useless. As such, scanning for the 'on' prefix can be of use in those cases.

For people who practice poor function and/or variable naming... @ you.


Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.