View Single Post
  #5  
Old 06-08-2005, 06:06 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
variable naming convention that lets me see at a glance what variables are when i have a bunch of similar ones - bad habit from gs1.
I'll break off of this if i can get arrays working >.<

In the old engine, variable names could contain periods, not sure in the new.



edit: and as for using sleep in a loop - I've come across a few situations where its necessary, such as a huge loop (10000+ loops).. if they exceed 10000, the script breaks, so add in a sleep every so many loops to ensure it works. I used this a script to see if the random function was a bell curve or flat (256000 iterations).. turns out to be remarkably flat ^ ^. In this instance I added it so I didn't get a 2-3 second bit of lag whenever I update the script, plus also i had a player.chat= for debugging, and I wanted to see what it said.
__________________
Reply With Quote