1
0
Pārlūkot izejas kodu

Dumb mistake, `i` never increased -> infinite loop

netuttki 1 gadu atpakaļ
vecāks
revīzija
b9846122d6
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 6 4
      locations/bank.qsrc

+ 6 - 4
locations/bank.qsrc

@@ -365,7 +365,7 @@ if $ARGS[0] = 'cikl':
 
 	!!MJ: Add some (daily) interest to the bank account.
 	!!Not very realistic but won''t make anyone too rich.
-
+	
 	if bankAccount = 1:
 		kartatotal = karta
 		:kartaloop
@@ -410,6 +410,7 @@ if $ARGS[0] = 'cikl':
 			atmDeposit = 0
 		end
 
+
 		! Daily Internet and mobile checks
 		$internet_action_messages = func('internet_mobile', 'check_subscription_actions')
 		count = ARRSIZE('$internet_action_messages')
@@ -586,10 +587,9 @@ if $ARGS[0] = 'cikl':
 	!!----------------------------------------
 	!! Rent
 	!!----------------------------------------
-
 	!! property_rent, property_days, $property_name, $property_display $property_code
 	gs 'homes_properties', 'get_rented_properties'
-	count = ARRSIZE('$property_name')
+	count = ARRSIZE('property_name')
 	if count > 0:
 		i = 0
 		:loop_rent_payments
@@ -612,8 +612,10 @@ if $ARGS[0] = 'cikl':
 					'<b><b><font color="red">Your card was declined during automatic rent deduction of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>. To avoid eviction, please rectify as soon as possible.</font></b>'
 				end
 			end
+			i += 1
 		if i < count: jump 'loop_rent_payments'
-		gs 'homes_properties', 'clean_up_property_data'  & killvar 'i'
+		gs 'homes_properties', 'clean_up_property_data'
+		killvar 'i'
 	end
 	!!------------------------------------------------------------------------------------------------------------