Hi,
Although this is rather straightforward and simple, something is apparently wrong with this code example, used in nwnx_funcs onplayerleaving, the script hooking the OnClientLeave event:
void main()
{
// OBJECT_SELF is the player currently leaving
string sName = GetName(OBJECT_SELF);
string sAcc = GetPCPlayerName(OBJECT_SELF);
AssignCommand(GetModule(), DelayCommand(300.0, UpdateDBPCInfos(sName, sAcc)));
}
The problem is, both variables are empty when the DelayCommand() is executed. This would be normal in the standard OnClientLeave event handler, but not with nwnx_funcs onplayerleaving... Maybe 12-15 hours of coding a day is ruining my brain and I forgot something simple, thanks in advance for any insight.
Kato
Modifié par Kato_Yang, 16 décembre 2011 - 05:48 .