Is it possible to make lua talkaction for exp share? and what code is that.
can this code work ?
And i get
/talkactions/scripts/expshare.lua
data/talkactions/scripts/expshare.lua:1: '=' expected near 'party'
can this code work ?
Code:
bool Party::setSharedExperience(Player* player, bool _sharedExpActive)
{
if(!player || getLeader() != player){
return false;
}
if(sharedExpActive == _sharedExpActive){
return true;
}
sharedExpActive = _sharedExpActive;
if(sharedExpActive){
sharedExpEnabled = canEnableSharedExperience();
if(sharedExpEnabled){
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience is now active.");
}
else{
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been activated," \
" but some members of your party are inactive.");
}
}
else{
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been deactivated.");
}
updateAllPartyIcons();
return true;
}
And i get
/talkactions/scripts/expshare.lua
data/talkactions/scripts/expshare.lua:1: '=' expected near 'party'