I don't see why you'd want to use loadvars in this scenario.
HTML Code:
public function onretrieveMessages(playerAccount)
{
temp.allAccounts = getstringkeys("this.msg_");
for (temp.currentAccount: temp.allAccounts)
if (temp.currentAccount == temp.playerAccount)
temp.messageList = this.(@"msg_"@ temp.playerAccount);
return(temp.messageList);
}
//You'd call this part of the code, eg "temp.myMessages = this.retrieveMessages(player.account);"
The flags:
HTML Code:
msg_Chandler="Hiya, how're you?", "Today I have a message"
msg_David="I am St...Dave", "hi Chandler! ;)"