Some days ago I tried to use localStorage to store a value on clients (their last played account name). It works well on single-player, but for some reason it isn't working on multiplayer.
Mob
onLogin()
var lastName = this.client.getLocalStorage('lastAccount')
if(lastName)
this.client.sendCommand('showText', {'interface': 'CharacterCreation', 'element': 'AccountInput', 'text': lastName})
#BEGIN CLIENTCODE
Client
onCommand(pCommand, pData)
if(pCommand == 'showText')
var pElement = this.getInterfaceElement(pData.interface, pData.element)
pElement.text = pData.text
setLocalStorage() and getLocalStorage() are both used on server-side procs.
#END CLIENTCODE
setLocalStorage() and getLocalStorage() are both used on server-side procs.
Mob onLogin() var lastName = this.client.getLocalStorage('lastAccount') if(lastName) this.client.sendCommand('showText', {'interface': 'CharacterCreation', 'element': 'AccountInput', 'text': lastName}) #BEGIN CLIENTCODE Client onCommand(pCommand, pData) if(pCommand == 'showText') var pElement = this.getInterfaceElement(pData.interface, pData.element) pElement.text = pData.text setLocalStorage() and getLocalStorage() are both used on server-side procs. #END CLIENTCODE
setLocalStorage() and getLocalStorage() are both used on server-side procs.