anchor.diff:  		if(polltype == "NUMVAL")
   			minval = input("Set minimum rating value.","Minimum rating") as num|null
   			if(!minval)
  -				return
  +				return pollid
   			maxval = input("Set maximum rating value.","Maximum rating") as num|null
   			if(!maxval)
  -				return
  +				return pollid
   			if(minval >= maxval)
   				src << "Minimum rating value can't be more than maximum rating value"
  -				return
  +				return pollid
   			descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null
   			if(descmin)
   				descmin = sanitizeSQL(descmin)
  +			else if(descmin == null)
  +				return pollid
   			descmid = input("Optional: Set description for median rating","Median rating description") as message|null
   			if(descmid)
   				descmid = sanitizeSQL(descmid)
  +			else if(descmid == null)
  +				return pollid
   			descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null
   			if(descmax)
   				descmax = sanitizeSQL(descmax)
  +			else if(descmax == null)
  +				return pollid
   		var/DBQuery/query_polladd_option = dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
   		if(!query_polladd_option.Execute())
   			var/err = query_polladd_option.ErrorMsg()
   			log_game("SQL ERROR adding new poll option to table. Error : \[[err]\]\n")
  -			return
  -		switch(alert(" ",,"Add option","Finish","Cancel"))
  +			return pollid
  +		switch(alert(" ",,"Add option","Finish"))
   			if("Add option")
   				add_option = 1
   			if("Finish")
  -				log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Question: [question] - Admin Only: [adminonly ? "Yes" : "No"]")
  -				message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Question: [question] - Admin Only: [adminonly ? "Yes" : "No"]")
   				add_option = 0
  -			else
  -				return
  +	return pollid
positive.code: 			if("No")
  				percentagecalc = 0
  			else
  				return
  		var/minval = 0
  		var/maxval = 0
  		var/descmin = ""
  
negative.code: /client/proc/create_poll()
  	set name = "Create Poll"
  	set category = "Special Verbs"
  	if(!check_rights(R_PERMISSIONS))	
  		return
  	if(!dbcon.IsConnected())
  		src << "<span class='danger'>Failed to establish database connection.</span>"
  		return
  	var/returned = create_poll_function()
  	if(returned)
  		var/DBQuery/query_check_option = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
  		if(!query_check_option.Execute())
  			var/err = query_check_option.ErrorMsg()
  			log_game("SQL ERROR obtaining id from poll_option table. Error : \[[err]\]\n")
  			return
  		if(query_check_option.NextRow())
  			var/DBQuery/query_log_get = dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
  			if(!query_log_get.Execute())
  				var/err = query_log_get.ErrorMsg()
  				log_game("SQL ERROR obtaining polltype, question, adminonly from poll_question table. Error : \[[err]\]\n")
  				return
  			if(query_log_get.NextRow())
  				var/polltype = query_log_get.item[1]
  				var/question = query_log_get.item[2]
  				var/adminonly = query_log_get.item[3]
  				log_admin("[key_name(usr)] has created a new server poll. Poll Type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]")
  				message_admins("[key_name_admin(usr)] has created a new server poll. Poll Type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
  		else
  			src << "Poll question created without any options, poll will be deleted."
  			var/DBQuery/query_del_poll = dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
  			if(!query_del_poll.Execute())
  				var/err = query_del_poll.ErrorMsg()
  				log_game("SQL ERROR deleting poll question [returned]. Error : \[[err]\]\n")
  				return
  
  /client/proc/create_poll_function()
  	if(!check_rights(R_PERMISSIONS))	
  		return
  	var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice")
  	var/choice_amount = 0
  