View Single Post
  #15  
Old 01-05-2004, 12:50 AM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Another reason:

NPC Code:

if (letter==A){
type A;
} if (letter==B){
type B;
} else {
type CDEFGHIJKLMNOPQRSTUVWXYZ;
}


If the letter's A, you'll also get CDEFGHIJKLMNOPQRSTUVWXYZ.

Good way:
NPC Code:

if (letter==A){
type A;
} else if (letter==B){
type B;
} else {
type CDEFGHIJKLMNOPQRSTUVWXYZ;
}


This bugged me for a while in C++, until i showed the scripts to Tseng and he said he liked if else better, i used that and it was fixed . Me < Tseng
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote