Quote:
Originally Posted by Inverness
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
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
NPC Code:
if (this.sentmail.(@j) > this.sentmail(@j[j+j-1])){
|
PHP Code:
temp.arr = this.sentmail.getdynamicvarnames();
temp.max = {-1,{""}};
for (j: temp.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.