diff --git a/quest_api.lua b/quest_api.lua index 79bcacf..44213d7 100644 --- a/quest_api.lua +++ b/quest_api.lua @@ -92,7 +92,10 @@ yl_speak_up.set_quest_variable_value = function(player_name, variable_name, new_ if(not(variable_name) or not(player_name) or not(yl_speak_up.player_vars[ k ])) then return false end - yl_speak_up.player_vars[ k ][ player_name ] = tostring(new_value) + if(new_value ~= nil) then + new_value = tostring(new_value) + end + yl_speak_up.player_vars[ k ][ player_name ] = new_value -- a quest variable was changed - save that to disc (but no need to force it) yl_speak_up.save_quest_variables(false) return true