Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-17-2007, 06:10 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
PHP Code:
for (jthis.sentmail.getdynamicvarnames()){
if (
this.sentmail.(@j) > this.sentmail(@j[j+j-1]){
this.mostsent this.sentmail.(@j);
this.mostsentacc j;
}

PHP Code:
if (this.sentmail.(@j) > this.sentmail(@j[j+j-1]){ 
i guess it could work if you change it to, and you forgot a closing )

PHP Code:
if (this.sentmail.(@j) > this.(@ "sentmail" j[j+j-1])){ 
or did you try to do this
PHP Code:
if (this.sentmail.(@j) > this.sentmail.(@j[j+j-1])){ 
Reply With Quote
  #2  
Old 01-17-2007, 06:16 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by projectigi View Post
PHP Code:
for (jthis.sentmail.getdynamicvarnames()){
if (
this.sentmail.(@j) > this.sentmail(@j[j+j-1]){
this.mostsent this.sentmail.(@j);
this.mostsentacc j;
}

PHP Code:
if (this.sentmail.(@j) > this.sentmail(@j[j+j-1]){ 
i guess it could work if you change it to, and you forgot a closing )

PHP Code:
if (this.sentmail.(@j) > this.(@ "sentmail" j[j+j-1])){ 
or did you try to do this
PHP Code:
if (this.sentmail.(@j) > this.sentmail.(@j[j+j-1])){ 
he only missed a bracet :O

if (this.sentmail.(@j) > this.sentmail(@j[j+j-1]){

should be

if (this.sentmail.(@j) > this.sentmail(@j[j+j-1])){

NPC Code:

if (this.sentmail.(@j) > this.sentmail(@j[j+j-1])){

__________________
Reply With Quote
  #3  
Old 01-17-2007, 08:13 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Chompy View Post
NPC Code:

if (this.sentmail.(@j) > this.sentmail(@j[j+j-1])){

That wouldn't work, because it would be trying to call the 'sentmail' function, the correct way to do it was already stated: this.(@"sentmail" @ j[j+j-1]), or by using makevar()
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #4  
Old 01-17-2007, 08:30 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Inverness View Post
I prefer using makevar() since the other way seems to get funky sometimes.
this.(@varname) is more efficient and less cluttered. It's 'funky' in the original post because he's using the for-each loop variables incorrectly.

Quote:
Originally Posted by projectigi View Post
i guess it could work if you change it to, and you forgot a closing )

PHP Code:
if (this.sentmail.(@j) > this.(@ "sentmail" j[j+j-1])){ 
or did you try to do this
PHP Code:
if (this.sentmail.(@j) > this.sentmail.(@j[j+j-1])){ 
Neither works. j is most likely a string. I don't know what str + str -1 makes. Nor can I be certain what str[str+str-1] does.

Quote:
Originally Posted by Chompy View Post
NPC Code:

if (this.sentmail.(@j) > this.sentmail(@j[j+j-1])){


PHP Code:
temp.arr this.sentmail.getdynamicvarnames();
temp.max = {-1,{""}};
for (
jtemp.arr) {
  
temp.sent this.sentmail.(@j);
  if (
temp.sent temp.max[0]) {
    
temp.max = {temp.sent,{j}};
  } elseif (
temp.sent == temp.max[0]) temp.max[1].add(j);
}
return 
temp.max[1]; 
Or something of that sort.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
Reply


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 09:59 AM.


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