Bläddra i källkod

[fixed] bug in the add_reply function and a small restructure of the set_replies and send_selfies functions

anjuna krokus 10 månader sedan
förälder
incheckning
c565ec0407
1 ändrade filer med 9 tillägg och 14 borttagningar
  1. 9 14
      locations/SMStext_builder.qsrc

+ 9 - 14
locations/SMStext_builder.qsrc

@@ -85,7 +85,7 @@ if $ARGS[0] = 'add_reply':
 	stb_n_args = arrsize('$ARGS')
 	stb_i = 2
 	:SMS_build_reply_loop
-	if stb_i <= stb_n_args:
+	if stb_i < stb_n_args:
 		$temp_reply_str += '''<<$ARGS[stb_i]>>'', '
 		stb_i += 1
 		jump 'SMS_build_reply_loop'
@@ -99,19 +99,15 @@ if $ARGS[0] = 'add_reply':
 	killvar 'stb_n_args'
 
 elseif $ARGS[0] = 'set_replies':
-	$temp_SMStext += '<table><tr><th> Reply</th></tr><tr><td>'
+	$temp_SMStext += '<table><tr><th> Reply</th></tr>'
 
 	stb_maxi = arrsize('temp_SMSreplies')
 	stb_i = 0
-	if stb_maxi >= 2:
-		:SMS_reply_loop
-			$temp_SMStext += $temp_SMSreplies[stb_i]
-			$temp_SMStext += '</td></tr><tr><td>'
-			stb_i += 1
-		if stb_i < stb_maxi - 1: jump 'SMS_reply_loop'
-	end
-	$temp_SMStext += $temp_SMSreplies[stb_i]
-	$temp_SMStext += '</td></tr></table>'
+	:SMS_reply_loop
+		$temp_SMStext += '<tr><td>' + $temp_SMSreplies[stb_i] + '</td></tr>'
+		stb_i += 1
+	if stb_i < stb_maxi: jump 'SMS_reply_loop'
+	$temp_SMStext += '</table>'
 
 	killvar '$temp_SMSreplies'
 	killvar 'stb_i'
@@ -136,17 +132,16 @@ end
 ! $ARGS[3] -> onward = the return location.
 ! gs 'SMStext_builder', 'send_selfie', 'Send a sexy selfie', 'c|b|ft', 'band_tour_anushka_SMS', 'Week8', 'Choice_a'
 if $ARGS[0] = 'send_selfie':
-	$temp_reply_str = '<a href="exec: gs ''SMS_selfies'', ''selfie_menu'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid''], '
+	$temp_reply_str = '<a href="exec: gs ''SMS_selfies'', ''selfie_menu'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid'']'
 
 	stb_n_args = arrsize('$ARGS')
 	stb_i = 3
 	:SMS_build_send_selfie_loop
 	if stb_i < stb_n_args:
-		$temp_reply_str +=  '''<<$ARGS[stb_i]>>'', '
+		$temp_reply_str += ', ''<<$ARGS[stb_i]>>'''
 		stb_i += 1
 		jump 'SMS_build_send_selfie_loop'
 	end
-	$temp_reply_str = mid($temp_reply_str, 1, len($temp_reply_str)-2)
 
 	$temp_reply_str += '"><<$ARGS[1]>></a>'
 	$temp_SMSreplies[] = $temp_reply_str