Thread: Script?
View Single Post
  #9  
Old 03-22-2002, 12:58 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Quote:
Originally posted by Falcor
It is wise to set constants in your scripts so you know WHY you have a number where you have it...

such as

if(created) pi = 3.1415;

so you know instead of having to type 3.1415 every time you want to use pi, just type pi its far more understandable.
And ammon, Why us % (mod) in that way? Itlowers the general efficiency of the script, thx kai for pointing this out...

Its not supose to be used in that way. rather in an if statement.

you sghould just do if(this.a > blah) this.a = 0;

my nick is Amon = þ" Lol..
and the "%" is a way that I found to use it, u can test, it will work fine.

I dont like to use " if(this.a > blah)" because I think its big, so I like to use some other way as "this.a=this.a<blah?this.a+=.1:this.a=0;"
or something like.... = þ
but the "%" works fine = ) I tested it online many times..
^_^

Last edited by amonrabr; 03-22-2002 at 01:13 AM..
Reply With Quote