PDA

View Full Version : Minor bug?


Chandler
02-16-2007, 10:25 PM
for (temp.curPlayer: allplayers)
{
if (!temp.curPlayer.account)
{
continue;
}
makevar("this.curV" @ temp.curPlayer.graalversion) += 1;
}
for (temp.curVersion: getstringkeys("this.curV"))
{
echo(temp.curVersion);
this.informOthers("Version:" SPC temp.curVersion @ "," SPC this.("curV" @ temp.curVersion));
}

returns:

V2
Classic (Server): Version: V2,
V4
Classic (Server): Version: V4,

However, the flags from the database return:

curV2.01=4
curV4.2=25


However, I decided to make the graal version an integer which fixed this problem, however if the graal version is greater than 0.6, it would equal to 1... :s

Riot
02-16-2007, 10:33 PM
getstringkeys("this.curV") is not returning the period and after since the 2 is considered a variable of "curV4". The same for the "this.curV2.01".

Chandler
02-16-2007, 10:47 PM
getstringkeys("this.curV") is not returning the period and after since the 2 is considered a variable of "curV4". The same for the "this.curV2.01".

Shouldn't getstringkeys detect this though? Or would I then need to do something like

for (temp.currentVersion: getstringkeys("this.curV"))
{
for (temp.currentGVersion: getstringkeys("this.curV" @ temp.currentVersion))
{
//
}
}

Admins
02-16-2007, 11:02 PM
You would need to do it recursive yes