Thread: 2 functions ?
View Single Post
  #1  
Old 05-19-2002, 01:18 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
2 functions ?

Is ok to set a function within a function?
NPC Code:

if (created||playerenters) {
toweapons Chat;
}
if (playerchats) {
tokenize #c;
for (i=0;i<tokenscount;i++) {
check();
}
}

// Functions
function check() {
if (strcontains(#t(i),#s(server.rsrvwords))) {
setplayerprop #c,Invalid and/or reserved words. Try again.;
} else {
addchat();
}
}


Reply With Quote