Advertisement
Guest User

Untitled

a guest
Mar 25th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 132.73 KB | None | 0 0
  1. $ cat debug.txt
  2. + : Eupatorium
  3. + cd Eupatorium
  4. ++ cat ../version.txt
  5. + VERSION=v2.73
  6. + LOGFILE=mffbot.log
  7. + OUTFILE=mffbottemp.html
  8. + COOKIEFILE=mffcookies.txt
  9. + FARMDATAFILE=farmdata.txt
  10. + LASTRUNFILE=lastrun.txt
  11. + STATUSFILE=isactive.txt
  12. + CFGFILE=config.ini
  13. + PIDFILE=bashpid.txt
  14. ++ which jq
  15. + JQBIN=/cygdrive/k/Documents/jq
  16. + USCRIPTURL=https://raw.githubusercontent.com/HackerHarry/mffbashbot/master/update.sh
  17. + UTMPFILE=/tmp/mffbot-update.sh
  18. + DONKEYCLAIMED=0
  19. + MFFUSER=Eupatorium
  20. + PAUSECORRECTEDAT=0
  21. + TIMEDELTA=0
  22. + CURRENTEPOCH=0
  23. + SKIPQUEUEUPDATE=0
  24. + TMPFILE=/tmp/Eupatorium-823
  25. ++ grep password config.ini
  26. ++ tr -d \'
  27. + MFFPASS='password = [REDACTED]'
  28. ++ grep server config.ini
  29. + MFFSERVER='server = 1'
  30. ++ grep lang config.ini
  31. ++ tr -d \'
  32. + MFFLANG='lang = pl'
  33. + set -- password = [REDACTED]
  34. + : [REDACTED]
  35. + MFFPASS=[REDACTED]
  36. + set -- server = 1
  37. + : 1
  38. + MFFSERVER=1
  39. + set -- lang = pl
  40. + : pl
  41. + MFFLANG=pl
  42. + case "$MFFLANG" in
  43. + DOMAIN=wolnifarmerzy.pl
  44. + aDIM_X='{"0":"0","1":"2","2":"2","3":"2","4":"2","5":"2","6":"2","7":"2","8":"2","9":"1","10":"1","11":"1","12":"1","13":"1","14":"1","15":"1","16":"1","17":"1","18":"1","19":"1","20":"1","21":"1","22":"1","23":"1","24":"1","25":"1","26":"1","27":"1","28":"1","29":"2","30":"1","31":"1","32":"1","33":"1","34":"1","35":"1","36":"2","37":"2","38":"1","39":"2","40":"2","41":"2","42":"2","43":"2","44":"1","91":"1","92":"1","93":"1","97":"1","45":"2","46":"1","47":"2","48":"2","49":"2","50":"1","51":"1","52":"2","53":"2","54":"2","55":"1","56":"2","57":"2","58":"2","59":"2","60":"2","61":"2","62":"2","63":"2","64":"2","65":"1","66":"2","67":"2","68":"1","69":"2","70":"2","71":"2","72":"2","73":"1","74":"1","75":"1","76":"2","77":"2","78":"2","79":"2","80":"2","81":"2","82":"2","83":"2","84":"2","85":"1","86":"1","87":"2","88":"2","89":"1","90":"2","94":"2","95":"2","96":"1","98":"2","99":"2","100":"2","101":"2","102":"2","103":"2","104":"1","105":"1","106":"2","107":"1","108":"2","109":"2","110":"1","111":"1","112":"1","113":"1","114":"2","115":"2","116":"1","117":"1","118":"1","119":"1","120":"1","121":"1","122":"1","123":"1","124":"1","125":"1","126":"1","127":"2","128":"2","129":"2","130":"1","131":"1","132":"1","133":"1","134":"1","135":"1","136":"1","137":"1","138":"1","139":"1","140":"1","141":"1","142":"1","143":"1","144":"1","145":"1","146":"1","147":"1","148":"1","149":"1","150":"1","151":"1","152":"1","153":"2","154":"2","155":"1","156":"1","157":"1","158":"2","159":"1","160":"1","161":"1","162":"1","163":"1","164":"1","165":"1","166":"1","167":"1","168":"1","169":"1","170":"1","171":"1","172":"1","173":"1","174":"1","175":"1","176":"1","177":"1","178":"1","179":"1","180":"1","181":"1","182":"1","183":"1","184":"1","185":"1","186":"1","187":"1","188":"1","189":"1","200":"1","201":"1","202":"1","203":"1","204":"1","205":"1","206":"1","207":"1","208":"1","209":"1","210":"1","211":"1","212":"1","213":"1","214":"1","215":"1","216":"1","217":"1","218":"1","219":"1","220":"1","221":"1","250":"1","251":"1","252":"1","253":"1","254":"1","255":"1","256":"1","257":"1","258":"1","259":"1","260":"1","261":"1","262":"1","263":"1","264":"1","265":"1","266":"1","267":"1","268":"1","269":"1","270":"1","271":"1","272":"1","273":"1","274":"1","275":"1","276":"1","300":"1","301":"1","302":"1","303":"1","304":"1","305":"1","306":"1","307":"1","308":"1","309":"1","310":"1","311":"1","312":"1","313":"1","314":"1","315":"1","316":"1","317":"1","318":"1","319":"1","320":"1","321":"1","322":"1","323":"1","324":"1","325":"1","326":"1","327":"1","328":"1","329":"1","330":"1","331":"1","332":"1","333":"1","334":"1","335":"1","336":"1","337":"1","338":"1","339":"1","340":"1","341":"1","342":"1","343":"1","344":"1","345":"1","346":"1","347":"1","348":"1","349":"1","350":"0","351":"2","352":"2","353":"2","354":"2","355":"1","356":"2","357":"1","358":"2","359":"2","360":"2","361":"2","400":"1","401":"1","402":"1","403":"1","450":"1","451":"1","452":"1","453":"1","454":"1","455":"1","456":"1","457":"1","458":"1","459":"1","460":"1","461":"1","462":"1","463":"1","464":"1","465":"1","466":"1","467":"1","468":"1","469":"1","470":"1","471":"1","472":"1","473":"1","474":"1","475":"1","476":"1","477":"1","478":"1","479":"1","480":"1","481":"1","482":"1","483":"1","550":"2","551":"2","552":"2","553":"2","554":"2","555":"2","556":"1","557":"2","558":"2","559":"2","560":"2","561":"2","600":"1","601":"1","602":"1","603":"1","604":"1","605":"1","606":"1","607":"1","608":"1","609":"1","630":"1","631":"1","632":"1","633":"1","634":"1","635":"1","636":"1","637":"1","638":"1","639":"1","660":"1","661":"1","662":"1","663":"1","664":"1","665":"1","666":"1","667":"1","668":"1","669":"1","700":"2","701":"1","702":"2","703":"2","704":"2","705":"1","706":"2","707":"2","708":"2","709":"2","750":"1","751":"1","752":"1","753":"1","754":"1","755":"1","756":"1","757":"1","758":"1","759":"1","804":"1","801":"1","800":"1","805":"1","802":"1","807":"1","803":"1","809":"1","806":"1","810":"1","808":"1","812":"1","811":"1","813":"1","815":"1","814":"1","816":"1","818":"1","817":"1","819":"1","820":"1","821":"1","822":"1","823":"1","824":"1","825":"1","826":"1","827":"1","828":"1","829":"2","830":"1","831":"1","832":"2","833":"1","834":"1"}'
  45. + aDIM_Y='{"0":"0","1":"1","2":"2","3":"1","4":"2","5":"2","6":"2","7":"2","8":"2","9":"1","10":"1","11":"1","12":"1","13":"1","14":"1","15":"1","16":"1","17":"1","18":"1","19":"1","20":"1","21":"1","22":"1","23":"1","24":"1","25":"1","26":"1","27":"1","28":"1","29":"1","30":"1","31":"1","32":"1","33":"1","34":"1","35":"1","36":"2","37":"2","38":"1","39":"2","40":"2","41":"2","42":"2","43":"2","44":"1","91":"1","92":"1","93":"1","97":"1","45":"2","46":"1","47":"2","48":"1","49":"2","50":"1","51":"1","52":"2","53":"2","54":"1","55":"1","56":"2","57":"2","58":"1","59":"2","60":"2","61":"2","62":"1","63":"1","64":"1","65":"1","66":"1","67":"2","68":"1","69":"1","70":"1","71":"1","72":"1","73":"1","74":"1","75":"1","76":"2","77":"2","78":"2","79":"2","80":"1","81":"2","82":"1","83":"1","84":"1","85":"1","86":"1","87":"1","88":"2","89":"1","90":"2","94":"1","95":"2","96":"1","98":"2","99":"1","100":"2","101":"2","102":"2","103":"2","104":"1","105":"1","106":"2","107":"1","108":"2","109":"1","110":"1","111":"1","112":"1","113":"1","114":"1","115":"1","116":"1","117":"1","118":"1","119":"1","120":"1","121":"1","122":"1","123":"1","124":"1","125":"1","126":"1","127":"2","128":"2","129":"2","130":"1","131":"1","132":"1","133":"1","134":"1","135":"1","136":"1","137":"1","138":"1","139":"1","140":"1","141":"1","142":"1","143":"1","144":"1","145":"1","146":"1","147":"1","148":"1","149":"1","150":"1","151":"1","152":"1","153":"1","154":"2","155":"1","156":"1","157":"1","158":"1","159":"1","160":"1","161":"1","162":"1","163":"1","164":"1","165":"1","166":"1","167":"1","168":"1","169":"1","170":"1","171":"1","172":"1","173":"1","174":"1","175":"1","176":"1","177":"1","178":"1","179":"1","180":"1","181":"1","182":"1","183":"1","184":"1","185":"1","186":"1","187":"1","188":"1","189":"1","200":"1","201":"1","202":"1","203":"1","204":"1","205":"1","206":"1","207":"1","208":"1","209":"1","210":"1","211":"1","212":"1","213":"1","214":"1","215":"1","216":"1","217":"1","218":"1","219":"1","220":"1","221":"1","250":"1","251":"1","252":"1","253":"1","254":"1","255":"1","256":"1","257":"1","258":"1","259":"1","260":"1","261":"1","262":"1","263":"1","264":"1","265":"1","266":"1","267":"1","268":"1","269":"1","270":"1","271":"1","272":"1","273":"1","274":"1","275":"1","276":"1","300":"1","301":"1","302":"1","303":"1","304":"1","305":"1","306":"1","307":"1","308":"1","309":"1","310":"1","311":"1","312":"1","313":"1","314":"1","315":"1","316":"1","317":"1","318":"1","319":"1","320":"1","321":"1","322":"1","323":"1","324":"1","325":"1","326":"1","327":"1","328":"1","329":"1","330":"1","331":"1","332":"1","333":"1","334":"1","335":"1","336":"1","337":"1","338":"1","339":"1","340":"1","341":"1","342":"1","343":"1","344":"1","345":"1","346":"1","347":"1","348":"1","349":"1","350":"0","351":"1","352":"1","353":"2","354":"2","355":"1","356":"2","357":"1","358":"2","359":"2","360":"1","361":"2","400":"1","401":"1","402":"1","403":"1","450":"1","451":"1","452":"1","453":"1","454":"1","455":"1","456":"1","457":"1","458":"1","459":"1","460":"1","461":"1","462":"1","463":"1","464":"1","465":"1","466":"1","467":"1","468":"1","469":"1","470":"1","471":"1","472":"1","473":"1","474":"1","475":"1","476":"1","477":"1","478":"1","479":"1","480":"1","481":"1","482":"1","483":"1","550":"2","551":"2","552":"2","553":"1","554":"2","555":"1","556":"1","557":"2","558":"2","559":"2","560":"2","561":"2","600":"1","601":"1","602":"1","603":"1","604":"1","605":"1","606":"1","607":"1","608":"1","609":"1","630":"1","631":"1","632":"1","633":"1","634":"1","635":"1","636":"1","637":"1","638":"1","639":"1","660":"1","661":"1","662":"1","663":"1","664":"1","665":"1","666":"1","667":"1","668":"1","669":"1","700":"2","701":"1","702":"1","703":"2","704":"1","705":"1","706":"2","707":"1","708":"2","709":"2","750":"1","751":"1","752":"1","753":"1","754":"1","755":"1","756":"1","757":"1","758":"1","759":"1","804":"1","801":"1","800":"1","805":"1","802":"1","807":"1","803":"1","809":"1","806":"1","810":"1","808":"1","812":"1","811":"1","813":"1","815":"1","814":"1","816":"1","818":"1","817":"1","819":"1","820":"1","821":"1","822":"1","823":"1","824":"1","825":"1","826":"1","827":"1","828":"1","829":"1","830":"1","831":"1","832":"2","833":"1","834":"1"}'
  46. + checkSoftwareVersions
  47. + local bTestsPassed=false
  48. + local iMajorVersion
  49. + local iMinorVersion
  50. ++ /cygdrive/k/Documents/jq --version
  51. + local $'sJQVer=jq-1.6\r'
  52. ++ echo $'jq-1.6\r'
  53. ++ sed 's/jq-\([1-9][0-9]*\)\..*/\1/'
  54. + iMajorVersion=1
  55. ++ echo $'jq-1.6\r'
  56. ++ sed 's/jq-[1-9][0-9]*\.\([0-9]*\).*/\1/'
  57. + iMinorVersion=6
  58. + '[' 1 -ge 1 ']'
  59. + '[' 1 -gt 1 ']'
  60. + [[ 1 -eq 1 ]]
  61. + [[ 6 -ge 5 ]]
  62. + '[' 4 -ge 4 ']'
  63. + '[' 4 -gt 4 ']'
  64. + [[ 4 -eq 4 ]]
  65. + [[ 4 -ge 3 ]]
  66. ++ php -r 'echo PHP_MAJOR_VERSION;'
  67. + iMajorVersion=7
  68. ++ php -r 'echo PHP_MINOR_VERSION;'
  69. + iMinorVersion=4
  70. + '[' 7 -ge 5 ']'
  71. + '[' 7 -gt 5 ']'
  72. + bTestsPassed=true
  73. + '[' true = false ']'
  74. + umask 002
  75. + echo 823
  76. + true
  77. + '[' -f ../updateInProgress ']'
  78. + '[' -f ../updateTrigger ']'
  79. ++ cat ../version.txt
  80. + '[' v2.73 '!=' v2.73 ']'
  81. + PAUSETIME=600
  82. + '[' -f dontrunbot ']'
  83. + '[' -f restartbot ']'
  84. + touch isactive.txt
  85. + rm mffcookies.txt
  86. ++ date +%s%N
  87. + NANOVALUE=1616684818249
  88. + LOGOFFURL='http://s1.wolnifarmerzy.pl/main.php?page=logout&logoutbutton=1'
  89. + POSTURL='https://www.wolnifarmerzy.pl/ajax/createtoken2.php?n=1616684818249'
  90. + AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0'
  91. + POSTDATA='server=1&username=Eupatorium&password=[REDACTED]&ref=&retid='
  92. + echo 'Running My Free Farm Bash Bot v2.73'
  93. Running My Free Farm Bash Bot v2.73
  94. + echo 'Getting a login token'
  95. Getting a login token
  96. ++ wget -nv -T10 -a mffbot.log --output-document=- '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0' '--post-data=server=1&username=Eupatorium&password=[REDACTED]&ref=&retid=' --keep-session-cookies --save-cookies mffcookies.txt 'https://www.wolnifarmerzy.pl/ajax/createtoken2.php?n=1616684818249'
  97. ++ sed -e 's/\[1,"\(.*\)"\]/\1/g'
  98. ++ sed -e 's/\\//g'
  99. + MFFTOKEN='https://wolnifarmerzy.pl/portal/port_logw.php?server=1&unr=5017501&portunr=25951342&token=63e7ba8985c11737869f6452d38a9ece'
  100. + echo 'Attempting to log in to MFF server 1 with username Eupatorium'
  101. Attempting to log in to MFF server 1 with username Eupatorium
  102. + wget -nv -T10 -a mffbot.log --output-document=mffbottemp.html '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0' --keep-session-cookies --save-cookies mffcookies.txt 'https://wolnifarmerzy.pl/portal/port_logw.php?server=1&unr=5017501&portunr=25951342&token=63e7ba8985c11737869f6452d38a9ece'
  103. ++ grep -om1 '[a-z0-9]\{32\}' mffbottemp.html
  104. + RID=3bd13b3de8bf026aa90033c24b6f2986
  105. + '[' -z 3bd13b3de8bf026aa90033c24b6f2986 ']'
  106. + echo 'Login successful'
  107. Login successful
  108. + source ../functions.sh
  109. ++ AJAXURL=http://s1.wolnifarmerzy.pl/ajax/
  110. ++ AJAXFARM='http://s1.wolnifarmerzy.pl/ajax/farm.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  111. ++ AJAXFOREST='http://s1.wolnifarmerzy.pl/ajax/forestry.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  112. ++ AJAXFOOD='http://s1.wolnifarmerzy.pl/ajax/foodworld.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  113. ++ AJAXCITY='http://s1.wolnifarmerzy.pl/ajax/city.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  114. ++ AJAXMAIN='http://s1.wolnifarmerzy.pl/ajax/main.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  115. ++ AJAXGUILD='http://s1.wolnifarmerzy.pl/ajax/guild.php?rid=3bd13b3de8bf026aa90033c24b6f2986&'
  116. + trap exitBot SIGINT SIGTERM
  117. + echo 'Getting farm status...'
  118. Getting farm status...
  119. + getFarmData farmdata.txt
  120. + local sFile=farmdata.txt
  121. + wget -nv -T10 -a mffbot.log --output-document=farmdata.txt '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0' --load-cookies mffcookies.txt 'http://s1.wolnifarmerzy.pl/ajax/farm.php?rid=3bd13b3de8bf026aa90033c24b6f2986&mode=getfarms&farm=1&position=0'
  122. ++ /cygdrive/k/Documents/jq -r .updateblock.menue.levelnum farmdata.txt
  123. + PLAYERLEVELNUM=$'18\r'
  124. ' echo 'Your player level is 18
  125. Your player level is 18
  126. ++ /cygdrive/k/Documents/jq .updateblock.menue.premium farmdata.txt
  127. + PREMIUM=$'0\r'
  128. + echo -n 'This is a '
  129. This is a + '[' $'0\r' -eq 0 ']'
  130. : integer expression expected
  131. + unset NONPREMIUM
  132. + echo 'premium account'
  133. premium account
  134. + checkLoginNews
  135. + local iNews
  136. ++ /cygdrive/k/Documents/jq -r '.updateblock.menue.news? | .[]? | select(.login == "1").nnr' farmdata.txt
  137. + local aNews=
  138. + grep -q 'dologinbonus = 0' config.ini
  139. + '[' $'18\r' -ge 8 ']'
  140. : integer expression expected8
  141. + checkActiveGuildJobForPlayer
  142. ++ /cygdrive/k/Documents/jq '.updateblock.job.guild_job_data | length' farmdata.txt
  143. + local $'iActiveGuildJob=0\r'
  144. + '[' $'0\r' -gt 0 ']'
  145. : integer expression expected: 0
  146. + return 1
  147. + for FARM in {1..7}
  148. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("1")' farmdata.txt
  149. + PLACEEXISTS=$'true\r'
  150. + '[' $'true\r' = false ']'
  151. + echo 'Checking for pending tasks on farm 1...'
  152. Checking for pending tasks on farm 1...
  153. + for POSITION in {1..6}
  154. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["1"].buildingid | tonumber' farmdata.txt
  155. + BUILDINGID=$'1\r'
  156. + '[' '' = NP ']'
  157. + '[' $'1\r' = 0 ']'
  158.  -lt 4 ]]
  159. ")syntax error: invalid arithmetic operator (error token is "
  160. + grep -q 'correctqueuenum = 1' config.ini
  161. + grep -q 'removeweed = 1' config.ini
  162. + '[' $'1\r' = 19 ']'
  163. ++ getMaxQueuesForBuildingID $'1\r'
  164. ++ local $'iBuildingID=1\r'
  165. ++ case "$iBuildingID" in
  166. ++ echo 1
  167. + '[' 1 -eq 3 ']'
  168. + aSLOTS=0
  169. + for SLOT in $aSLOTS
  170. + checkTimeRemaining '.updateblock.farms.farms["1"]["1"].production[0]?.remain'
  171. + local 'sFilter=.updateblock.farms.farms["1"]["1"].production[0]?.remain'
  172. + sFilter='.updateblock.farms.farms["1"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) > 0 and . < 600 then . else empty end'
  173. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) > 0 and . < 600 then . else empty end' farmdata.txt
  174. + local $'iRemaining=0\r'
  175. + '[' -z $'0\r' ']'
  176. + '[' $'0\r' -eq 0 ']'
  177. : integer expression expected: 0
  178. + PAUSETIME=$'0\r'
  179. ++ date +%s
  180. + PAUSECORRECTEDAT=1616684823
  181. + return 1
  182. + '[' 0 -eq 0 ']'
  183. + checkTimeRemaining '.updateblock.farms.farms["1"]["1"].water[0].waterremain'
  184. + local 'sFilter=.updateblock.farms.farms["1"]["1"].water[0].waterremain'
  185. + sFilter='.updateblock.farms.farms["1"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  186. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  187. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  188. .updateblock.farms.farms["1"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  189. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  190. .updateblock.farms.farms["1"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  191. jq: 2 compile errors
  192. + local iRemaining=
  193. + '[' -z '' ']'
  194. + return 1
  195. + for POSITION in {1..6}
  196. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["2"].buildingid | tonumber' farmdata.txt
  197. + BUILDINGID=$'2\r'
  198. + '[' '' = NP ']'
  199. + '[' $'2\r' = 0 ']'
  200.  -lt 4 ]]
  201. ")syntax error: invalid arithmetic operator (error token is "
  202. + grep -q 'correctqueuenum = 1' config.ini
  203. + grep -q 'removeweed = 1' config.ini
  204. + '[' $'2\r' = 19 ']'
  205. ++ getMaxQueuesForBuildingID $'2\r'
  206. ++ local $'iBuildingID=2\r'
  207. ++ case "$iBuildingID" in
  208. ++ echo 1
  209. + '[' 1 -eq 3 ']'
  210. + aSLOTS=0
  211. + for SLOT in $aSLOTS
  212. + checkTimeRemaining '.updateblock.farms.farms["1"]["2"].production[0]?.remain'
  213. + local 'sFilter=.updateblock.farms.farms["1"]["2"].production[0]?.remain'
  214. + sFilter='.updateblock.farms.farms["1"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  215. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  216. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  217. .updateblock.farms.farms["1"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  218. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  219. .updateblock.farms.farms["1"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  220. jq: 2 compile errors
  221. + local iRemaining=
  222. + '[' -z '' ']'
  223. + return 1
  224. + '[' 0 -eq 0 ']'
  225. + checkTimeRemaining '.updateblock.farms.farms["1"]["2"].water[0].waterremain'
  226. + local 'sFilter=.updateblock.farms.farms["1"]["2"].water[0].waterremain'
  227. + sFilter='.updateblock.farms.farms["1"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  228. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  229. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  230. .updateblock.farms.farms["1"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  231. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  232. .updateblock.farms.farms["1"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  233. jq: 2 compile errors
  234. + local iRemaining=
  235. + '[' -z '' ']'
  236. + return 1
  237. + for POSITION in {1..6}
  238. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["3"].buildingid | tonumber' farmdata.txt
  239. + BUILDINGID=$'1\r'
  240. + '[' '' = NP ']'
  241. + '[' $'1\r' = 0 ']'
  242.  -lt 4 ]]
  243. ")syntax error: invalid arithmetic operator (error token is "
  244. + grep -q 'correctqueuenum = 1' config.ini
  245. + grep -q 'removeweed = 1' config.ini
  246. + '[' $'1\r' = 19 ']'
  247. ++ getMaxQueuesForBuildingID $'1\r'
  248. ++ local $'iBuildingID=1\r'
  249. ++ case "$iBuildingID" in
  250. ++ echo 1
  251. + '[' 1 -eq 3 ']'
  252. + aSLOTS=0
  253. + for SLOT in $aSLOTS
  254. + checkTimeRemaining '.updateblock.farms.farms["1"]["3"].production[0]?.remain'
  255. + local 'sFilter=.updateblock.farms.farms["1"]["3"].production[0]?.remain'
  256. + sFilter='.updateblock.farms.farms["1"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  257. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  258. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  259. .updateblock.farms.farms["1"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  260. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  261. .updateblock.farms.farms["1"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  262. jq: 2 compile errors
  263. + local iRemaining=
  264. + '[' -z '' ']'
  265. + return 1
  266. + '[' 0 -eq 0 ']'
  267. + checkTimeRemaining '.updateblock.farms.farms["1"]["3"].water[0].waterremain'
  268. + local 'sFilter=.updateblock.farms.farms["1"]["3"].water[0].waterremain'
  269. + sFilter='.updateblock.farms.farms["1"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  270. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  271. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  272. .updateblock.farms.farms["1"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  273. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  274. .updateblock.farms.farms["1"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  275. jq: 2 compile errors
  276. + local iRemaining=
  277. + '[' -z '' ']'
  278. + return 1
  279. + for POSITION in {1..6}
  280. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["4"].buildingid | tonumber' farmdata.txt
  281. + BUILDINGID=$'3\r'
  282. + '[' '' = NP ']'
  283. + '[' $'3\r' = 0 ']'
  284.  -lt 4 ]]
  285. ")syntax error: invalid arithmetic operator (error token is "
  286. + grep -q 'correctqueuenum = 1' config.ini
  287. + grep -q 'removeweed = 1' config.ini
  288. + '[' $'3\r' = 19 ']'
  289. ++ getMaxQueuesForBuildingID $'3\r'
  290. ++ local $'iBuildingID=3\r'
  291. ++ case "$iBuildingID" in
  292. ++ echo 1
  293. + '[' 1 -eq 3 ']'
  294. + aSLOTS=0
  295. + for SLOT in $aSLOTS
  296. + checkTimeRemaining '.updateblock.farms.farms["1"]["4"].production[0]?.remain'
  297. + local 'sFilter=.updateblock.farms.farms["1"]["4"].production[0]?.remain'
  298. + sFilter='.updateblock.farms.farms["1"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  299. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  300. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  301. .updateblock.farms.farms["1"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  302. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  303. .updateblock.farms.farms["1"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  304. jq: 2 compile errors
  305. + local iRemaining=
  306. + '[' -z '' ']'
  307. + return 1
  308. + '[' 0 -eq 0 ']'
  309. + checkTimeRemaining '.updateblock.farms.farms["1"]["4"].water[0].waterremain'
  310. + local 'sFilter=.updateblock.farms.farms["1"]["4"].water[0].waterremain'
  311. + sFilter='.updateblock.farms.farms["1"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  312. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  313. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  314. .updateblock.farms.farms["1"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  315. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  316. .updateblock.farms.farms["1"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  317. jq: 2 compile errors
  318. + local iRemaining=
  319. + '[' -z '' ']'
  320. + return 1
  321. + for POSITION in {1..6}
  322. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["5"].buildingid | tonumber' farmdata.txt
  323. + BUILDINGID=$'0\r'
  324. + '[' '' = NP ']'
  325. + '[' $'0\r' = 0 ']'
  326.  -lt 4 ]]
  327. ")syntax error: invalid arithmetic operator (error token is "
  328. + grep -q 'correctqueuenum = 1' config.ini
  329. + grep -q 'removeweed = 1' config.ini
  330. + '[' $'0\r' = 19 ']'
  331. ++ getMaxQueuesForBuildingID $'0\r'
  332. ++ local $'iBuildingID=0\r'
  333. ++ case "$iBuildingID" in
  334. ++ echo 1
  335. + '[' 1 -eq 3 ']'
  336. + aSLOTS=0
  337. + for SLOT in $aSLOTS
  338. + checkTimeRemaining '.updateblock.farms.farms["1"]["5"].production[0]?.remain'
  339. + local 'sFilter=.updateblock.farms.farms["1"]["5"].production[0]?.remain'
  340. + sFilter='.updateblock.farms.farms["1"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  341. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  342. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  343. .updateblock.farms.farms["1"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  344. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  345. .updateblock.farms.farms["1"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  346. jq: 2 compile errors
  347. + local iRemaining=
  348. + '[' -z '' ']'
  349. + return 1
  350. + '[' 0 -eq 0 ']'
  351. + checkTimeRemaining '.updateblock.farms.farms["1"]["5"].water[0].waterremain'
  352. + local 'sFilter=.updateblock.farms.farms["1"]["5"].water[0].waterremain'
  353. + sFilter='.updateblock.farms.farms["1"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  354. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  355. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  356. .updateblock.farms.farms["1"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  357. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  358. .updateblock.farms.farms["1"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  359. jq: 2 compile errors
  360. + local iRemaining=
  361. + '[' -z '' ']'
  362. + return 1
  363. + for POSITION in {1..6}
  364. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["6"].buildingid | tonumber' farmdata.txt
  365. + BUILDINGID=$'0\r'
  366. + '[' '' = NP ']'
  367. + '[' $'0\r' = 0 ']'
  368.  -lt 4 ]]
  369. ")syntax error: invalid arithmetic operator (error token is "
  370. + grep -q 'correctqueuenum = 1' config.ini
  371. + grep -q 'removeweed = 1' config.ini
  372. + '[' $'0\r' = 19 ']'
  373. ++ getMaxQueuesForBuildingID $'0\r'
  374. ++ local $'iBuildingID=0\r'
  375. ++ case "$iBuildingID" in
  376. ++ echo 1
  377. + '[' 1 -eq 3 ']'
  378. + aSLOTS=0
  379. + for SLOT in $aSLOTS
  380. + checkTimeRemaining '.updateblock.farms.farms["1"]["6"].production[0]?.remain'
  381. + local 'sFilter=.updateblock.farms.farms["1"]["6"].production[0]?.remain'
  382. + sFilter='.updateblock.farms.farms["1"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  383. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  384. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  385. .updateblock.farms.farms["1"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  386. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  387. .updateblock.farms.farms["1"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  388. jq: 2 compile errors
  389. + local iRemaining=
  390. + '[' -z '' ']'
  391. + return 1
  392. + '[' 0 -eq 0 ']'
  393. + checkTimeRemaining '.updateblock.farms.farms["1"]["6"].water[0].waterremain'
  394. + local 'sFilter=.updateblock.farms.farms["1"]["6"].water[0].waterremain'
  395. + sFilter='.updateblock.farms.farms["1"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  396. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["1"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  397. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  398. .updateblock.farms.farms["1"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  399. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  400. .updateblock.farms.farms["1"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  401. jq: 2 compile errors
  402. + local iRemaining=
  403. + '[' -z '' ']'
  404. + return 1
  405. + for FARM in {1..7}
  406. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("2")' farmdata.txt
  407. + PLACEEXISTS=$'false\r'
  408. + '[' $'false\r' = false ']'
  409. + echo 'Checking for pending tasks on farm 2...'
  410. Checking for pending tasks on farm 2...
  411. + for POSITION in {1..6}
  412. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["1"].buildingid | tonumber' farmdata.txt
  413. + BUILDINGID=
  414. + '[' '' = NP ']'
  415. + '[' '' = 0 ']'
  416.  -lt 4 ]]
  417. ")syntax error: invalid arithmetic operator (error token is "
  418. + grep -q 'correctqueuenum = 1' config.ini
  419. + grep -q 'removeweed = 1' config.ini
  420. + '[' '' = 19 ']'
  421. ++ getMaxQueuesForBuildingID
  422. ++ local iBuildingID=
  423. ++ case "$iBuildingID" in
  424. ++ echo 1
  425. + '[' 1 -eq 3 ']'
  426. + aSLOTS=0
  427. + for SLOT in $aSLOTS
  428. + checkTimeRemaining '.updateblock.farms.farms["2"]["1"].production[0]?.remain'
  429. + local 'sFilter=.updateblock.farms.farms["2"]["1"].production[0]?.remain'
  430. + sFilter='.updateblock.farms.farms["2"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  431. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  432. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  433. .updateblock.farms.farms["2"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  434. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  435. .updateblock.farms.farms["2"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  436. jq: 2 compile errors
  437. + local iRemaining=
  438. + '[' -z '' ']'
  439. + return 1
  440. + '[' 0 -eq 0 ']'
  441. + checkTimeRemaining '.updateblock.farms.farms["2"]["1"].water[0].waterremain'
  442. + local 'sFilter=.updateblock.farms.farms["2"]["1"].water[0].waterremain'
  443. + sFilter='.updateblock.farms.farms["2"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  444. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  445. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  446. .updateblock.farms.farms["2"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  447. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  448. .updateblock.farms.farms["2"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  449. jq: 2 compile errors
  450. + local iRemaining=
  451. + '[' -z '' ']'
  452. + return 1
  453. + for POSITION in {1..6}
  454. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["2"].buildingid | tonumber' farmdata.txt
  455. + BUILDINGID=
  456. + '[' '' = NP ']'
  457. + '[' '' = 0 ']'
  458.  -lt 4 ]]
  459. ")syntax error: invalid arithmetic operator (error token is "
  460. + grep -q 'correctqueuenum = 1' config.ini
  461. + grep -q 'removeweed = 1' config.ini
  462. + '[' '' = 19 ']'
  463. ++ getMaxQueuesForBuildingID
  464. ++ local iBuildingID=
  465. ++ case "$iBuildingID" in
  466. ++ echo 1
  467. + '[' 1 -eq 3 ']'
  468. + aSLOTS=0
  469. + for SLOT in $aSLOTS
  470. + checkTimeRemaining '.updateblock.farms.farms["2"]["2"].production[0]?.remain'
  471. + local 'sFilter=.updateblock.farms.farms["2"]["2"].production[0]?.remain'
  472. + sFilter='.updateblock.farms.farms["2"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  473. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  474. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  475. .updateblock.farms.farms["2"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  476. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  477. .updateblock.farms.farms["2"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  478. jq: 2 compile errors
  479. + local iRemaining=
  480. + '[' -z '' ']'
  481. + return 1
  482. + '[' 0 -eq 0 ']'
  483. + checkTimeRemaining '.updateblock.farms.farms["2"]["2"].water[0].waterremain'
  484. + local 'sFilter=.updateblock.farms.farms["2"]["2"].water[0].waterremain'
  485. + sFilter='.updateblock.farms.farms["2"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  486. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  487. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  488. .updateblock.farms.farms["2"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  489. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  490. .updateblock.farms.farms["2"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  491. jq: 2 compile errors
  492. + local iRemaining=
  493. + '[' -z '' ']'
  494. + return 1
  495. + for POSITION in {1..6}
  496. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["3"].buildingid | tonumber' farmdata.txt
  497. + BUILDINGID=
  498. + '[' '' = NP ']'
  499. + '[' '' = 0 ']'
  500.  -lt 4 ]]
  501. ")syntax error: invalid arithmetic operator (error token is "
  502. + grep -q 'correctqueuenum = 1' config.ini
  503. + grep -q 'removeweed = 1' config.ini
  504. + '[' '' = 19 ']'
  505. ++ getMaxQueuesForBuildingID
  506. ++ local iBuildingID=
  507. ++ case "$iBuildingID" in
  508. ++ echo 1
  509. + '[' 1 -eq 3 ']'
  510. + aSLOTS=0
  511. + for SLOT in $aSLOTS
  512. + checkTimeRemaining '.updateblock.farms.farms["2"]["3"].production[0]?.remain'
  513. + local 'sFilter=.updateblock.farms.farms["2"]["3"].production[0]?.remain'
  514. + sFilter='.updateblock.farms.farms["2"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  515. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  516. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  517. .updateblock.farms.farms["2"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  518. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  519. .updateblock.farms.farms["2"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  520. jq: 2 compile errors
  521. + local iRemaining=
  522. + '[' -z '' ']'
  523. + return 1
  524. + '[' 0 -eq 0 ']'
  525. + checkTimeRemaining '.updateblock.farms.farms["2"]["3"].water[0].waterremain'
  526. + local 'sFilter=.updateblock.farms.farms["2"]["3"].water[0].waterremain'
  527. + sFilter='.updateblock.farms.farms["2"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  528. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  529. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  530. .updateblock.farms.farms["2"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  531. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  532. .updateblock.farms.farms["2"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  533. jq: 2 compile errors
  534. + local iRemaining=
  535. + '[' -z '' ']'
  536. + return 1
  537. + for POSITION in {1..6}
  538. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["4"].buildingid | tonumber' farmdata.txt
  539. + BUILDINGID=
  540. + '[' '' = NP ']'
  541. + '[' '' = 0 ']'
  542.  -lt 4 ]]
  543. ")syntax error: invalid arithmetic operator (error token is "
  544. + grep -q 'correctqueuenum = 1' config.ini
  545. + grep -q 'removeweed = 1' config.ini
  546. + '[' '' = 19 ']'
  547. ++ getMaxQueuesForBuildingID
  548. ++ local iBuildingID=
  549. ++ case "$iBuildingID" in
  550. ++ echo 1
  551. + '[' 1 -eq 3 ']'
  552. + aSLOTS=0
  553. + for SLOT in $aSLOTS
  554. + checkTimeRemaining '.updateblock.farms.farms["2"]["4"].production[0]?.remain'
  555. + local 'sFilter=.updateblock.farms.farms["2"]["4"].production[0]?.remain'
  556. + sFilter='.updateblock.farms.farms["2"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  557. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  558. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  559. .updateblock.farms.farms["2"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  560. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  561. .updateblock.farms.farms["2"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  562. jq: 2 compile errors
  563. + local iRemaining=
  564. + '[' -z '' ']'
  565. + return 1
  566. + '[' 0 -eq 0 ']'
  567. + checkTimeRemaining '.updateblock.farms.farms["2"]["4"].water[0].waterremain'
  568. + local 'sFilter=.updateblock.farms.farms["2"]["4"].water[0].waterremain'
  569. + sFilter='.updateblock.farms.farms["2"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  570. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  571. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  572. .updateblock.farms.farms["2"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  573. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  574. .updateblock.farms.farms["2"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  575. jq: 2 compile errors
  576. + local iRemaining=
  577. + '[' -z '' ']'
  578. + return 1
  579. + for POSITION in {1..6}
  580. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["5"].buildingid | tonumber' farmdata.txt
  581. + BUILDINGID=
  582. + '[' '' = NP ']'
  583. + '[' '' = 0 ']'
  584.  -lt 4 ]]
  585. ")syntax error: invalid arithmetic operator (error token is "
  586. + grep -q 'correctqueuenum = 1' config.ini
  587. + grep -q 'removeweed = 1' config.ini
  588. + '[' '' = 19 ']'
  589. ++ getMaxQueuesForBuildingID
  590. ++ local iBuildingID=
  591. ++ case "$iBuildingID" in
  592. ++ echo 1
  593. + '[' 1 -eq 3 ']'
  594. + aSLOTS=0
  595. + for SLOT in $aSLOTS
  596. + checkTimeRemaining '.updateblock.farms.farms["2"]["5"].production[0]?.remain'
  597. + local 'sFilter=.updateblock.farms.farms["2"]["5"].production[0]?.remain'
  598. + sFilter='.updateblock.farms.farms["2"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  599. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  600. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  601. .updateblock.farms.farms["2"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  602. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  603. .updateblock.farms.farms["2"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  604. jq: 2 compile errors
  605. + local iRemaining=
  606. + '[' -z '' ']'
  607. + return 1
  608. + '[' 0 -eq 0 ']'
  609. + checkTimeRemaining '.updateblock.farms.farms["2"]["5"].water[0].waterremain'
  610. + local 'sFilter=.updateblock.farms.farms["2"]["5"].water[0].waterremain'
  611. + sFilter='.updateblock.farms.farms["2"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  612. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  613. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  614. .updateblock.farms.farms["2"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  615. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  616. .updateblock.farms.farms["2"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  617. jq: 2 compile errors
  618. + local iRemaining=
  619. + '[' -z '' ']'
  620. + return 1
  621. + for POSITION in {1..6}
  622. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["6"].buildingid | tonumber' farmdata.txt
  623. + BUILDINGID=
  624. + '[' '' = NP ']'
  625. + '[' '' = 0 ']'
  626.  -lt 4 ]]
  627. ")syntax error: invalid arithmetic operator (error token is "
  628. + grep -q 'correctqueuenum = 1' config.ini
  629. + grep -q 'removeweed = 1' config.ini
  630. + '[' '' = 19 ']'
  631. ++ getMaxQueuesForBuildingID
  632. ++ local iBuildingID=
  633. ++ case "$iBuildingID" in
  634. ++ echo 1
  635. + '[' 1 -eq 3 ']'
  636. + aSLOTS=0
  637. + for SLOT in $aSLOTS
  638. + checkTimeRemaining '.updateblock.farms.farms["2"]["6"].production[0]?.remain'
  639. + local 'sFilter=.updateblock.farms.farms["2"]["6"].production[0]?.remain'
  640. + sFilter='.updateblock.farms.farms["2"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  641. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  642. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  643. .updateblock.farms.farms["2"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  644. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  645. .updateblock.farms.farms["2"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  646. jq: 2 compile errors
  647. + local iRemaining=
  648. + '[' -z '' ']'
  649. + return 1
  650. + '[' 0 -eq 0 ']'
  651. + checkTimeRemaining '.updateblock.farms.farms["2"]["6"].water[0].waterremain'
  652. + local 'sFilter=.updateblock.farms.farms["2"]["6"].water[0].waterremain'
  653. + sFilter='.updateblock.farms.farms["2"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  654. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["2"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  655. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  656. .updateblock.farms.farms["2"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  657. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  658. .updateblock.farms.farms["2"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  659. jq: 2 compile errors
  660. + local iRemaining=
  661. + '[' -z '' ']'
  662. + return 1
  663. + for FARM in {1..7}
  664. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("3")' farmdata.txt
  665. + PLACEEXISTS=$'false\r'
  666. + '[' $'false\r' = false ']'
  667. + echo 'Checking for pending tasks on farm 3...'
  668. Checking for pending tasks on farm 3...
  669. + for POSITION in {1..6}
  670. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["1"].buildingid | tonumber' farmdata.txt
  671. + BUILDINGID=
  672. + '[' '' = NP ']'
  673. + '[' '' = 0 ']'
  674.  -lt 4 ]]
  675. ")syntax error: invalid arithmetic operator (error token is "
  676. + grep -q 'correctqueuenum = 1' config.ini
  677. + grep -q 'removeweed = 1' config.ini
  678. + '[' '' = 19 ']'
  679. ++ getMaxQueuesForBuildingID
  680. ++ local iBuildingID=
  681. ++ case "$iBuildingID" in
  682. ++ echo 1
  683. + '[' 1 -eq 3 ']'
  684. + aSLOTS=0
  685. + for SLOT in $aSLOTS
  686. + checkTimeRemaining '.updateblock.farms.farms["3"]["1"].production[0]?.remain'
  687. + local 'sFilter=.updateblock.farms.farms["3"]["1"].production[0]?.remain'
  688. + sFilter='.updateblock.farms.farms["3"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  689. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  690. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  691. .updateblock.farms.farms["3"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  692. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  693. .updateblock.farms.farms["3"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  694. jq: 2 compile errors
  695. + local iRemaining=
  696. + '[' -z '' ']'
  697. + return 1
  698. + '[' 0 -eq 0 ']'
  699. + checkTimeRemaining '.updateblock.farms.farms["3"]["1"].water[0].waterremain'
  700. + local 'sFilter=.updateblock.farms.farms["3"]["1"].water[0].waterremain'
  701. + sFilter='.updateblock.farms.farms["3"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  702. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  703. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  704. .updateblock.farms.farms["3"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  705. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  706. .updateblock.farms.farms["3"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  707. jq: 2 compile errors
  708. + local iRemaining=
  709. + '[' -z '' ']'
  710. + return 1
  711. + for POSITION in {1..6}
  712. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["2"].buildingid | tonumber' farmdata.txt
  713. + BUILDINGID=
  714. + '[' '' = NP ']'
  715. + '[' '' = 0 ']'
  716.  -lt 4 ]]
  717. ")syntax error: invalid arithmetic operator (error token is "
  718. + grep -q 'correctqueuenum = 1' config.ini
  719. + grep -q 'removeweed = 1' config.ini
  720. + '[' '' = 19 ']'
  721. ++ getMaxQueuesForBuildingID
  722. ++ local iBuildingID=
  723. ++ case "$iBuildingID" in
  724. ++ echo 1
  725. + '[' 1 -eq 3 ']'
  726. + aSLOTS=0
  727. + for SLOT in $aSLOTS
  728. + checkTimeRemaining '.updateblock.farms.farms["3"]["2"].production[0]?.remain'
  729. + local 'sFilter=.updateblock.farms.farms["3"]["2"].production[0]?.remain'
  730. + sFilter='.updateblock.farms.farms["3"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  731. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  732. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  733. .updateblock.farms.farms["3"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  734. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  735. .updateblock.farms.farms["3"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  736. jq: 2 compile errors
  737. + local iRemaining=
  738. + '[' -z '' ']'
  739. + return 1
  740. + '[' 0 -eq 0 ']'
  741. + checkTimeRemaining '.updateblock.farms.farms["3"]["2"].water[0].waterremain'
  742. + local 'sFilter=.updateblock.farms.farms["3"]["2"].water[0].waterremain'
  743. + sFilter='.updateblock.farms.farms["3"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  744. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  745. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  746. .updateblock.farms.farms["3"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  747. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  748. .updateblock.farms.farms["3"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  749. jq: 2 compile errors
  750. + local iRemaining=
  751. + '[' -z '' ']'
  752. + return 1
  753. + for POSITION in {1..6}
  754. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["3"].buildingid | tonumber' farmdata.txt
  755. + BUILDINGID=
  756. + '[' '' = NP ']'
  757. + '[' '' = 0 ']'
  758.  -lt 4 ]]
  759. ")syntax error: invalid arithmetic operator (error token is "
  760. + grep -q 'correctqueuenum = 1' config.ini
  761. + grep -q 'removeweed = 1' config.ini
  762. + '[' '' = 19 ']'
  763. ++ getMaxQueuesForBuildingID
  764. ++ local iBuildingID=
  765. ++ case "$iBuildingID" in
  766. ++ echo 1
  767. + '[' 1 -eq 3 ']'
  768. + aSLOTS=0
  769. + for SLOT in $aSLOTS
  770. + checkTimeRemaining '.updateblock.farms.farms["3"]["3"].production[0]?.remain'
  771. + local 'sFilter=.updateblock.farms.farms["3"]["3"].production[0]?.remain'
  772. + sFilter='.updateblock.farms.farms["3"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  773. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  774. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  775. .updateblock.farms.farms["3"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  776. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  777. .updateblock.farms.farms["3"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  778. jq: 2 compile errors
  779. + local iRemaining=
  780. + '[' -z '' ']'
  781. + return 1
  782. + '[' 0 -eq 0 ']'
  783. + checkTimeRemaining '.updateblock.farms.farms["3"]["3"].water[0].waterremain'
  784. + local 'sFilter=.updateblock.farms.farms["3"]["3"].water[0].waterremain'
  785. + sFilter='.updateblock.farms.farms["3"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  786. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  787. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  788. .updateblock.farms.farms["3"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  789. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  790. .updateblock.farms.farms["3"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  791. jq: 2 compile errors
  792. + local iRemaining=
  793. + '[' -z '' ']'
  794. + return 1
  795. + for POSITION in {1..6}
  796. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["4"].buildingid | tonumber' farmdata.txt
  797. + BUILDINGID=
  798. + '[' '' = NP ']'
  799. + '[' '' = 0 ']'
  800.  -lt 4 ]]
  801. ")syntax error: invalid arithmetic operator (error token is "
  802. + grep -q 'correctqueuenum = 1' config.ini
  803. + grep -q 'removeweed = 1' config.ini
  804. + '[' '' = 19 ']'
  805. ++ getMaxQueuesForBuildingID
  806. ++ local iBuildingID=
  807. ++ case "$iBuildingID" in
  808. ++ echo 1
  809. + '[' 1 -eq 3 ']'
  810. + aSLOTS=0
  811. + for SLOT in $aSLOTS
  812. + checkTimeRemaining '.updateblock.farms.farms["3"]["4"].production[0]?.remain'
  813. + local 'sFilter=.updateblock.farms.farms["3"]["4"].production[0]?.remain'
  814. + sFilter='.updateblock.farms.farms["3"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  815. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  816. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  817. .updateblock.farms.farms["3"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  818. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  819. .updateblock.farms.farms["3"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  820. jq: 2 compile errors
  821. + local iRemaining=
  822. + '[' -z '' ']'
  823. + return 1
  824. + '[' 0 -eq 0 ']'
  825. + checkTimeRemaining '.updateblock.farms.farms["3"]["4"].water[0].waterremain'
  826. + local 'sFilter=.updateblock.farms.farms["3"]["4"].water[0].waterremain'
  827. + sFilter='.updateblock.farms.farms["3"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  828. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  829. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  830. .updateblock.farms.farms["3"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  831. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  832. .updateblock.farms.farms["3"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  833. jq: 2 compile errors
  834. + local iRemaining=
  835. + '[' -z '' ']'
  836. + return 1
  837. + for POSITION in {1..6}
  838. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["5"].buildingid | tonumber' farmdata.txt
  839. + BUILDINGID=
  840. + '[' '' = NP ']'
  841. + '[' '' = 0 ']'
  842.  -lt 4 ]]
  843. ")syntax error: invalid arithmetic operator (error token is "
  844. + grep -q 'correctqueuenum = 1' config.ini
  845. + grep -q 'removeweed = 1' config.ini
  846. + '[' '' = 19 ']'
  847. ++ getMaxQueuesForBuildingID
  848. ++ local iBuildingID=
  849. ++ case "$iBuildingID" in
  850. ++ echo 1
  851. + '[' 1 -eq 3 ']'
  852. + aSLOTS=0
  853. + for SLOT in $aSLOTS
  854. + checkTimeRemaining '.updateblock.farms.farms["3"]["5"].production[0]?.remain'
  855. + local 'sFilter=.updateblock.farms.farms["3"]["5"].production[0]?.remain'
  856. + sFilter='.updateblock.farms.farms["3"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  857. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  858. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  859. .updateblock.farms.farms["3"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  860. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  861. .updateblock.farms.farms["3"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  862. jq: 2 compile errors
  863. + local iRemaining=
  864. + '[' -z '' ']'
  865. + return 1
  866. + '[' 0 -eq 0 ']'
  867. + checkTimeRemaining '.updateblock.farms.farms["3"]["5"].water[0].waterremain'
  868. + local 'sFilter=.updateblock.farms.farms["3"]["5"].water[0].waterremain'
  869. + sFilter='.updateblock.farms.farms["3"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  870. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  871. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  872. .updateblock.farms.farms["3"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  873. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  874. .updateblock.farms.farms["3"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  875. jq: 2 compile errors
  876. + local iRemaining=
  877. + '[' -z '' ']'
  878. + return 1
  879. + for POSITION in {1..6}
  880. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["6"].buildingid | tonumber' farmdata.txt
  881. + BUILDINGID=
  882. + '[' '' = NP ']'
  883. + '[' '' = 0 ']'
  884.  -lt 4 ]]
  885. ")syntax error: invalid arithmetic operator (error token is "
  886. + grep -q 'correctqueuenum = 1' config.ini
  887. + grep -q 'removeweed = 1' config.ini
  888. + '[' '' = 19 ']'
  889. ++ getMaxQueuesForBuildingID
  890. ++ local iBuildingID=
  891. ++ case "$iBuildingID" in
  892. ++ echo 1
  893. + '[' 1 -eq 3 ']'
  894. + aSLOTS=0
  895. + for SLOT in $aSLOTS
  896. + checkTimeRemaining '.updateblock.farms.farms["3"]["6"].production[0]?.remain'
  897. + local 'sFilter=.updateblock.farms.farms["3"]["6"].production[0]?.remain'
  898. + sFilter='.updateblock.farms.farms["3"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  899. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  900. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  901. .updateblock.farms.farms["3"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  902. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  903. .updateblock.farms.farms["3"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  904. jq: 2 compile errors
  905. + local iRemaining=
  906. + '[' -z '' ']'
  907. + return 1
  908. + '[' 0 -eq 0 ']'
  909. + checkTimeRemaining '.updateblock.farms.farms["3"]["6"].water[0].waterremain'
  910. + local 'sFilter=.updateblock.farms.farms["3"]["6"].water[0].waterremain'
  911. + sFilter='.updateblock.farms.farms["3"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  912. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["3"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  913. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  914. .updateblock.farms.farms["3"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  915. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  916. .updateblock.farms.farms["3"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  917. jq: 2 compile errors
  918. + local iRemaining=
  919. + '[' -z '' ']'
  920. + return 1
  921. + for FARM in {1..7}
  922. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("4")' farmdata.txt
  923. + PLACEEXISTS=$'false\r'
  924. + '[' $'false\r' = false ']'
  925. + echo 'Checking for pending tasks on farm 4...'
  926. Checking for pending tasks on farm 4...
  927. + for POSITION in {1..6}
  928. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["1"].buildingid | tonumber' farmdata.txt
  929. + BUILDINGID=
  930. + '[' '' = NP ']'
  931. + '[' '' = 0 ']'
  932.  -lt 4 ]]
  933. ")syntax error: invalid arithmetic operator (error token is "
  934. + grep -q 'correctqueuenum = 1' config.ini
  935. + grep -q 'removeweed = 1' config.ini
  936. + '[' '' = 19 ']'
  937. ++ getMaxQueuesForBuildingID
  938. ++ local iBuildingID=
  939. ++ case "$iBuildingID" in
  940. ++ echo 1
  941. + '[' 1 -eq 3 ']'
  942. + aSLOTS=0
  943. + for SLOT in $aSLOTS
  944. + checkTimeRemaining '.updateblock.farms.farms["4"]["1"].production[0]?.remain'
  945. + local 'sFilter=.updateblock.farms.farms["4"]["1"].production[0]?.remain'
  946. + sFilter='.updateblock.farms.farms["4"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  947. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  948. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  949. .updateblock.farms.farms["4"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  950. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  951. .updateblock.farms.farms["4"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  952. jq: 2 compile errors
  953. + local iRemaining=
  954. + '[' -z '' ']'
  955. + return 1
  956. + '[' 0 -eq 0 ']'
  957. + checkTimeRemaining '.updateblock.farms.farms["4"]["1"].water[0].waterremain'
  958. + local 'sFilter=.updateblock.farms.farms["4"]["1"].water[0].waterremain'
  959. + sFilter='.updateblock.farms.farms["4"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  960. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  961. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  962. .updateblock.farms.farms["4"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  963. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  964. .updateblock.farms.farms["4"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  965. jq: 2 compile errors
  966. + local iRemaining=
  967. + '[' -z '' ']'
  968. + return 1
  969. + for POSITION in {1..6}
  970. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["2"].buildingid | tonumber' farmdata.txt
  971. + BUILDINGID=
  972. + '[' '' = NP ']'
  973. + '[' '' = 0 ']'
  974.  -lt 4 ]]
  975. ")syntax error: invalid arithmetic operator (error token is "
  976. + grep -q 'correctqueuenum = 1' config.ini
  977. + grep -q 'removeweed = 1' config.ini
  978. + '[' '' = 19 ']'
  979. ++ getMaxQueuesForBuildingID
  980. ++ local iBuildingID=
  981. ++ case "$iBuildingID" in
  982. ++ echo 1
  983. + '[' 1 -eq 3 ']'
  984. + aSLOTS=0
  985. + for SLOT in $aSLOTS
  986. + checkTimeRemaining '.updateblock.farms.farms["4"]["2"].production[0]?.remain'
  987. + local 'sFilter=.updateblock.farms.farms["4"]["2"].production[0]?.remain'
  988. + sFilter='.updateblock.farms.farms["4"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  989. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  990. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  991. .updateblock.farms.farms["4"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  992. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  993. .updateblock.farms.farms["4"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  994. jq: 2 compile errors
  995. + local iRemaining=
  996. + '[' -z '' ']'
  997. + return 1
  998. + '[' 0 -eq 0 ']'
  999. + checkTimeRemaining '.updateblock.farms.farms["4"]["2"].water[0].waterremain'
  1000. + local 'sFilter=.updateblock.farms.farms["4"]["2"].water[0].waterremain'
  1001. + sFilter='.updateblock.farms.farms["4"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1002. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1003. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1004. .updateblock.farms.farms["4"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1005. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1006. .updateblock.farms.farms["4"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1007. jq: 2 compile errors
  1008. + local iRemaining=
  1009. + '[' -z '' ']'
  1010. + return 1
  1011. + for POSITION in {1..6}
  1012. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["3"].buildingid | tonumber' farmdata.txt
  1013. + BUILDINGID=
  1014. + '[' '' = NP ']'
  1015. + '[' '' = 0 ']'
  1016.  -lt 4 ]]
  1017. ")syntax error: invalid arithmetic operator (error token is "
  1018. + grep -q 'correctqueuenum = 1' config.ini
  1019. + grep -q 'removeweed = 1' config.ini
  1020. + '[' '' = 19 ']'
  1021. ++ getMaxQueuesForBuildingID
  1022. ++ local iBuildingID=
  1023. ++ case "$iBuildingID" in
  1024. ++ echo 1
  1025. + '[' 1 -eq 3 ']'
  1026. + aSLOTS=0
  1027. + for SLOT in $aSLOTS
  1028. + checkTimeRemaining '.updateblock.farms.farms["4"]["3"].production[0]?.remain'
  1029. + local 'sFilter=.updateblock.farms.farms["4"]["3"].production[0]?.remain'
  1030. + sFilter='.updateblock.farms.farms["4"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1031. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1032. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1033. .updateblock.farms.farms["4"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1034. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1035. .updateblock.farms.farms["4"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1036. jq: 2 compile errors
  1037. + local iRemaining=
  1038. + '[' -z '' ']'
  1039. + return 1
  1040. + '[' 0 -eq 0 ']'
  1041. + checkTimeRemaining '.updateblock.farms.farms["4"]["3"].water[0].waterremain'
  1042. + local 'sFilter=.updateblock.farms.farms["4"]["3"].water[0].waterremain'
  1043. + sFilter='.updateblock.farms.farms["4"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1044. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1045. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1046. .updateblock.farms.farms["4"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1047. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1048. .updateblock.farms.farms["4"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1049. jq: 2 compile errors
  1050. + local iRemaining=
  1051. + '[' -z '' ']'
  1052. + return 1
  1053. + for POSITION in {1..6}
  1054. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["4"].buildingid | tonumber' farmdata.txt
  1055. + BUILDINGID=
  1056. + '[' '' = NP ']'
  1057. + '[' '' = 0 ']'
  1058.  -lt 4 ]]
  1059. ")syntax error: invalid arithmetic operator (error token is "
  1060. + grep -q 'correctqueuenum = 1' config.ini
  1061. + grep -q 'removeweed = 1' config.ini
  1062. + '[' '' = 19 ']'
  1063. ++ getMaxQueuesForBuildingID
  1064. ++ local iBuildingID=
  1065. ++ case "$iBuildingID" in
  1066. ++ echo 1
  1067. + '[' 1 -eq 3 ']'
  1068. + aSLOTS=0
  1069. + for SLOT in $aSLOTS
  1070. + checkTimeRemaining '.updateblock.farms.farms["4"]["4"].production[0]?.remain'
  1071. + local 'sFilter=.updateblock.farms.farms["4"]["4"].production[0]?.remain'
  1072. + sFilter='.updateblock.farms.farms["4"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1073. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1074. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1075. .updateblock.farms.farms["4"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1076. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1077. .updateblock.farms.farms["4"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1078. jq: 2 compile errors
  1079. + local iRemaining=
  1080. + '[' -z '' ']'
  1081. + return 1
  1082. + '[' 0 -eq 0 ']'
  1083. + checkTimeRemaining '.updateblock.farms.farms["4"]["4"].water[0].waterremain'
  1084. + local 'sFilter=.updateblock.farms.farms["4"]["4"].water[0].waterremain'
  1085. + sFilter='.updateblock.farms.farms["4"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1086. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1087. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1088. .updateblock.farms.farms["4"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1089. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1090. .updateblock.farms.farms["4"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1091. jq: 2 compile errors
  1092. + local iRemaining=
  1093. + '[' -z '' ']'
  1094. + return 1
  1095. + for POSITION in {1..6}
  1096. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["5"].buildingid | tonumber' farmdata.txt
  1097. + BUILDINGID=
  1098. + '[' '' = NP ']'
  1099. + '[' '' = 0 ']'
  1100.  -lt 4 ]]
  1101. ")syntax error: invalid arithmetic operator (error token is "
  1102. + grep -q 'correctqueuenum = 1' config.ini
  1103. + grep -q 'removeweed = 1' config.ini
  1104. + '[' '' = 19 ']'
  1105. ++ getMaxQueuesForBuildingID
  1106. ++ local iBuildingID=
  1107. ++ case "$iBuildingID" in
  1108. ++ echo 1
  1109. + '[' 1 -eq 3 ']'
  1110. + aSLOTS=0
  1111. + for SLOT in $aSLOTS
  1112. + checkTimeRemaining '.updateblock.farms.farms["4"]["5"].production[0]?.remain'
  1113. + local 'sFilter=.updateblock.farms.farms["4"]["5"].production[0]?.remain'
  1114. + sFilter='.updateblock.farms.farms["4"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1115. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1116. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1117. .updateblock.farms.farms["4"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1118. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1119. .updateblock.farms.farms["4"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1120. jq: 2 compile errors
  1121. + local iRemaining=
  1122. + '[' -z '' ']'
  1123. + return 1
  1124. + '[' 0 -eq 0 ']'
  1125. + checkTimeRemaining '.updateblock.farms.farms["4"]["5"].water[0].waterremain'
  1126. + local 'sFilter=.updateblock.farms.farms["4"]["5"].water[0].waterremain'
  1127. + sFilter='.updateblock.farms.farms["4"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1128. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1129. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1130. .updateblock.farms.farms["4"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1131. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1132. .updateblock.farms.farms["4"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1133. jq: 2 compile errors
  1134. + local iRemaining=
  1135. + '[' -z '' ']'
  1136. + return 1
  1137. + for POSITION in {1..6}
  1138. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["6"].buildingid | tonumber' farmdata.txt
  1139. + BUILDINGID=
  1140. + '[' '' = NP ']'
  1141. + '[' '' = 0 ']'
  1142.  -lt 4 ]]
  1143. ")syntax error: invalid arithmetic operator (error token is "
  1144. + grep -q 'correctqueuenum = 1' config.ini
  1145. + grep -q 'removeweed = 1' config.ini
  1146. + '[' '' = 19 ']'
  1147. ++ getMaxQueuesForBuildingID
  1148. ++ local iBuildingID=
  1149. ++ case "$iBuildingID" in
  1150. ++ echo 1
  1151. + '[' 1 -eq 3 ']'
  1152. + aSLOTS=0
  1153. + for SLOT in $aSLOTS
  1154. + checkTimeRemaining '.updateblock.farms.farms["4"]["6"].production[0]?.remain'
  1155. + local 'sFilter=.updateblock.farms.farms["4"]["6"].production[0]?.remain'
  1156. + sFilter='.updateblock.farms.farms["4"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1157. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1158. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1159. .updateblock.farms.farms["4"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1160. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1161. .updateblock.farms.farms["4"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1162. jq: 2 compile errors
  1163. + local iRemaining=
  1164. + '[' -z '' ']'
  1165. + return 1
  1166. + '[' 0 -eq 0 ']'
  1167. + checkTimeRemaining '.updateblock.farms.farms["4"]["6"].water[0].waterremain'
  1168. + local 'sFilter=.updateblock.farms.farms["4"]["6"].water[0].waterremain'
  1169. + sFilter='.updateblock.farms.farms["4"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1170. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["4"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1171. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1172. .updateblock.farms.farms["4"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1173. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1174. .updateblock.farms.farms["4"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1175. jq: 2 compile errors
  1176. + local iRemaining=
  1177. + '[' -z '' ']'
  1178. + return 1
  1179. + for FARM in {1..7}
  1180. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("5")' farmdata.txt
  1181. + PLACEEXISTS=$'false\r'
  1182. + '[' $'false\r' = false ']'
  1183. + echo 'Checking for pending tasks on farm 5...'
  1184. Checking for pending tasks on farm 5...
  1185. + for POSITION in {1..6}
  1186. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["1"].buildingid | tonumber' farmdata.txt
  1187. + BUILDINGID=
  1188. + '[' '' = NP ']'
  1189. + '[' '' = 0 ']'
  1190.  -lt 4 ]]
  1191. ")syntax error: invalid arithmetic operator (error token is "
  1192. + grep -q 'correctqueuenum = 1' config.ini
  1193. + grep -q 'removeweed = 1' config.ini
  1194. + '[' '' = 19 ']'
  1195. ++ getMaxQueuesForBuildingID
  1196. ++ local iBuildingID=
  1197. ++ case "$iBuildingID" in
  1198. ++ echo 1
  1199. + '[' 1 -eq 3 ']'
  1200. + aSLOTS=0
  1201. + for SLOT in $aSLOTS
  1202. + checkTimeRemaining '.updateblock.farms.farms["5"]["1"].production[0]?.remain'
  1203. + local 'sFilter=.updateblock.farms.farms["5"]["1"].production[0]?.remain'
  1204. + sFilter='.updateblock.farms.farms["5"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1205. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1206. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1207. .updateblock.farms.farms["5"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1208. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1209. .updateblock.farms.farms["5"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1210. jq: 2 compile errors
  1211. + local iRemaining=
  1212. + '[' -z '' ']'
  1213. + return 1
  1214. + '[' 0 -eq 0 ']'
  1215. + checkTimeRemaining '.updateblock.farms.farms["5"]["1"].water[0].waterremain'
  1216. + local 'sFilter=.updateblock.farms.farms["5"]["1"].water[0].waterremain'
  1217. + sFilter='.updateblock.farms.farms["5"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1218. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1219. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1220. .updateblock.farms.farms["5"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1221. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1222. .updateblock.farms.farms["5"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1223. jq: 2 compile errors
  1224. + local iRemaining=
  1225. + '[' -z '' ']'
  1226. + return 1
  1227. + for POSITION in {1..6}
  1228. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["2"].buildingid | tonumber' farmdata.txt
  1229. + BUILDINGID=
  1230. + '[' '' = NP ']'
  1231. + '[' '' = 0 ']'
  1232.  -lt 4 ]]
  1233. ")syntax error: invalid arithmetic operator (error token is "
  1234. + grep -q 'correctqueuenum = 1' config.ini
  1235. + grep -q 'removeweed = 1' config.ini
  1236. + '[' '' = 19 ']'
  1237. ++ getMaxQueuesForBuildingID
  1238. ++ local iBuildingID=
  1239. ++ case "$iBuildingID" in
  1240. ++ echo 1
  1241. + '[' 1 -eq 3 ']'
  1242. + aSLOTS=0
  1243. + for SLOT in $aSLOTS
  1244. + checkTimeRemaining '.updateblock.farms.farms["5"]["2"].production[0]?.remain'
  1245. + local 'sFilter=.updateblock.farms.farms["5"]["2"].production[0]?.remain'
  1246. + sFilter='.updateblock.farms.farms["5"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1247. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1248. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1249. .updateblock.farms.farms["5"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1250. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1251. .updateblock.farms.farms["5"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1252. jq: 2 compile errors
  1253. + local iRemaining=
  1254. + '[' -z '' ']'
  1255. + return 1
  1256. + '[' 0 -eq 0 ']'
  1257. + checkTimeRemaining '.updateblock.farms.farms["5"]["2"].water[0].waterremain'
  1258. + local 'sFilter=.updateblock.farms.farms["5"]["2"].water[0].waterremain'
  1259. + sFilter='.updateblock.farms.farms["5"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1260. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1261. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1262. .updateblock.farms.farms["5"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1263. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1264. .updateblock.farms.farms["5"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1265. jq: 2 compile errors
  1266. + local iRemaining=
  1267. + '[' -z '' ']'
  1268. + return 1
  1269. + for POSITION in {1..6}
  1270. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["3"].buildingid | tonumber' farmdata.txt
  1271. + BUILDINGID=
  1272. + '[' '' = NP ']'
  1273. + '[' '' = 0 ']'
  1274.  -lt 4 ]]
  1275. ")syntax error: invalid arithmetic operator (error token is "
  1276. + grep -q 'correctqueuenum = 1' config.ini
  1277. + grep -q 'removeweed = 1' config.ini
  1278. + '[' '' = 19 ']'
  1279. ++ getMaxQueuesForBuildingID
  1280. ++ local iBuildingID=
  1281. ++ case "$iBuildingID" in
  1282. ++ echo 1
  1283. + '[' 1 -eq 3 ']'
  1284. + aSLOTS=0
  1285. + for SLOT in $aSLOTS
  1286. + checkTimeRemaining '.updateblock.farms.farms["5"]["3"].production[0]?.remain'
  1287. + local 'sFilter=.updateblock.farms.farms["5"]["3"].production[0]?.remain'
  1288. + sFilter='.updateblock.farms.farms["5"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1289. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1290. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1291. .updateblock.farms.farms["5"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1292. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1293. .updateblock.farms.farms["5"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1294. jq: 2 compile errors
  1295. + local iRemaining=
  1296. + '[' -z '' ']'
  1297. + return 1
  1298. + '[' 0 -eq 0 ']'
  1299. + checkTimeRemaining '.updateblock.farms.farms["5"]["3"].water[0].waterremain'
  1300. + local 'sFilter=.updateblock.farms.farms["5"]["3"].water[0].waterremain'
  1301. + sFilter='.updateblock.farms.farms["5"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1302. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1303. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1304. .updateblock.farms.farms["5"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1305. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1306. .updateblock.farms.farms["5"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1307. jq: 2 compile errors
  1308. + local iRemaining=
  1309. + '[' -z '' ']'
  1310. + return 1
  1311. + for POSITION in {1..6}
  1312. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["4"].buildingid | tonumber' farmdata.txt
  1313. + BUILDINGID=
  1314. + '[' '' = NP ']'
  1315. + '[' '' = 0 ']'
  1316.  -lt 4 ]]
  1317. ")syntax error: invalid arithmetic operator (error token is "
  1318. + grep -q 'correctqueuenum = 1' config.ini
  1319. + grep -q 'removeweed = 1' config.ini
  1320. + '[' '' = 19 ']'
  1321. ++ getMaxQueuesForBuildingID
  1322. ++ local iBuildingID=
  1323. ++ case "$iBuildingID" in
  1324. ++ echo 1
  1325. + '[' 1 -eq 3 ']'
  1326. + aSLOTS=0
  1327. + for SLOT in $aSLOTS
  1328. + checkTimeRemaining '.updateblock.farms.farms["5"]["4"].production[0]?.remain'
  1329. + local 'sFilter=.updateblock.farms.farms["5"]["4"].production[0]?.remain'
  1330. + sFilter='.updateblock.farms.farms["5"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1331. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1332. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1333. .updateblock.farms.farms["5"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1334. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1335. .updateblock.farms.farms["5"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1336. jq: 2 compile errors
  1337. + local iRemaining=
  1338. + '[' -z '' ']'
  1339. + return 1
  1340. + '[' 0 -eq 0 ']'
  1341. + checkTimeRemaining '.updateblock.farms.farms["5"]["4"].water[0].waterremain'
  1342. + local 'sFilter=.updateblock.farms.farms["5"]["4"].water[0].waterremain'
  1343. + sFilter='.updateblock.farms.farms["5"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1344. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1345. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1346. .updateblock.farms.farms["5"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1347. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1348. .updateblock.farms.farms["5"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1349. jq: 2 compile errors
  1350. + local iRemaining=
  1351. + '[' -z '' ']'
  1352. + return 1
  1353. + for POSITION in {1..6}
  1354. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["5"].buildingid | tonumber' farmdata.txt
  1355. + BUILDINGID=
  1356. + '[' '' = NP ']'
  1357. + '[' '' = 0 ']'
  1358.  -lt 4 ]]
  1359. ")syntax error: invalid arithmetic operator (error token is "
  1360. + grep -q 'correctqueuenum = 1' config.ini
  1361. + grep -q 'removeweed = 1' config.ini
  1362. + '[' '' = 19 ']'
  1363. ++ getMaxQueuesForBuildingID
  1364. ++ local iBuildingID=
  1365. ++ case "$iBuildingID" in
  1366. ++ echo 1
  1367. + '[' 1 -eq 3 ']'
  1368. + aSLOTS=0
  1369. + for SLOT in $aSLOTS
  1370. + checkTimeRemaining '.updateblock.farms.farms["5"]["5"].production[0]?.remain'
  1371. + local 'sFilter=.updateblock.farms.farms["5"]["5"].production[0]?.remain'
  1372. + sFilter='.updateblock.farms.farms["5"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1373. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1374. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1375. .updateblock.farms.farms["5"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1376. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1377. .updateblock.farms.farms["5"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1378. jq: 2 compile errors
  1379. + local iRemaining=
  1380. + '[' -z '' ']'
  1381. + return 1
  1382. + '[' 0 -eq 0 ']'
  1383. + checkTimeRemaining '.updateblock.farms.farms["5"]["5"].water[0].waterremain'
  1384. + local 'sFilter=.updateblock.farms.farms["5"]["5"].water[0].waterremain'
  1385. + sFilter='.updateblock.farms.farms["5"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1386. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1387. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1388. .updateblock.farms.farms["5"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1389. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1390. .updateblock.farms.farms["5"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1391. jq: 2 compile errors
  1392. + local iRemaining=
  1393. + '[' -z '' ']'
  1394. + return 1
  1395. + for POSITION in {1..6}
  1396. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["6"].buildingid | tonumber' farmdata.txt
  1397. + BUILDINGID=
  1398. + '[' '' = NP ']'
  1399. + '[' '' = 0 ']'
  1400.  -lt 4 ]]
  1401. ")syntax error: invalid arithmetic operator (error token is "
  1402. + grep -q 'correctqueuenum = 1' config.ini
  1403. + grep -q 'removeweed = 1' config.ini
  1404. + '[' '' = 19 ']'
  1405. ++ getMaxQueuesForBuildingID
  1406. ++ local iBuildingID=
  1407. ++ case "$iBuildingID" in
  1408. ++ echo 1
  1409. + '[' 1 -eq 3 ']'
  1410. + aSLOTS=0
  1411. + for SLOT in $aSLOTS
  1412. + checkTimeRemaining '.updateblock.farms.farms["5"]["6"].production[0]?.remain'
  1413. + local 'sFilter=.updateblock.farms.farms["5"]["6"].production[0]?.remain'
  1414. + sFilter='.updateblock.farms.farms["5"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1415. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1416. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1417. .updateblock.farms.farms["5"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1418. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1419. .updateblock.farms.farms["5"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1420. jq: 2 compile errors
  1421. + local iRemaining=
  1422. + '[' -z '' ']'
  1423. + return 1
  1424. + '[' 0 -eq 0 ']'
  1425. + checkTimeRemaining '.updateblock.farms.farms["5"]["6"].water[0].waterremain'
  1426. + local 'sFilter=.updateblock.farms.farms["5"]["6"].water[0].waterremain'
  1427. + sFilter='.updateblock.farms.farms["5"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1428. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["5"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1429. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1430. .updateblock.farms.farms["5"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1431. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1432. .updateblock.farms.farms["5"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1433. jq: 2 compile errors
  1434. + local iRemaining=
  1435. + '[' -z '' ']'
  1436. + return 1
  1437. + for FARM in {1..7}
  1438. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("6")' farmdata.txt
  1439. + PLACEEXISTS=$'false\r'
  1440. + '[' $'false\r' = false ']'
  1441. + echo 'Checking for pending tasks on farm 6...'
  1442. Checking for pending tasks on farm 6...
  1443. + for POSITION in {1..6}
  1444. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["1"].buildingid | tonumber' farmdata.txt
  1445. + BUILDINGID=
  1446. + '[' '' = NP ']'
  1447. + '[' '' = 0 ']'
  1448.  -lt 4 ]]
  1449. ")syntax error: invalid arithmetic operator (error token is "
  1450. + grep -q 'correctqueuenum = 1' config.ini
  1451. + grep -q 'removeweed = 1' config.ini
  1452. + '[' '' = 19 ']'
  1453. ++ getMaxQueuesForBuildingID
  1454. ++ local iBuildingID=
  1455. ++ case "$iBuildingID" in
  1456. ++ echo 1
  1457. + '[' 1 -eq 3 ']'
  1458. + aSLOTS=0
  1459. + for SLOT in $aSLOTS
  1460. + checkTimeRemaining '.updateblock.farms.farms["6"]["1"].production[0]?.remain'
  1461. + local 'sFilter=.updateblock.farms.farms["6"]["1"].production[0]?.remain'
  1462. + sFilter='.updateblock.farms.farms["6"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1463. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1464. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1465. .updateblock.farms.farms["6"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1466. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1467. .updateblock.farms.farms["6"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1468. jq: 2 compile errors
  1469. + local iRemaining=
  1470. + '[' -z '' ']'
  1471. + return 1
  1472. + '[' 0 -eq 0 ']'
  1473. + checkTimeRemaining '.updateblock.farms.farms["6"]["1"].water[0].waterremain'
  1474. + local 'sFilter=.updateblock.farms.farms["6"]["1"].water[0].waterremain'
  1475. + sFilter='.updateblock.farms.farms["6"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1476. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1477. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1478. .updateblock.farms.farms["6"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1479. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1480. .updateblock.farms.farms["6"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1481. jq: 2 compile errors
  1482. + local iRemaining=
  1483. + '[' -z '' ']'
  1484. + return 1
  1485. + for POSITION in {1..6}
  1486. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["2"].buildingid | tonumber' farmdata.txt
  1487. + BUILDINGID=
  1488. + '[' '' = NP ']'
  1489. + '[' '' = 0 ']'
  1490.  -lt 4 ]]
  1491. ")syntax error: invalid arithmetic operator (error token is "
  1492. + grep -q 'correctqueuenum = 1' config.ini
  1493. + grep -q 'removeweed = 1' config.ini
  1494. + '[' '' = 19 ']'
  1495. ++ getMaxQueuesForBuildingID
  1496. ++ local iBuildingID=
  1497. ++ case "$iBuildingID" in
  1498. ++ echo 1
  1499. + '[' 1 -eq 3 ']'
  1500. + aSLOTS=0
  1501. + for SLOT in $aSLOTS
  1502. + checkTimeRemaining '.updateblock.farms.farms["6"]["2"].production[0]?.remain'
  1503. + local 'sFilter=.updateblock.farms.farms["6"]["2"].production[0]?.remain'
  1504. + sFilter='.updateblock.farms.farms["6"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1505. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1506. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1507. .updateblock.farms.farms["6"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1508. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1509. .updateblock.farms.farms["6"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1510. jq: 2 compile errors
  1511. + local iRemaining=
  1512. + '[' -z '' ']'
  1513. + return 1
  1514. + '[' 0 -eq 0 ']'
  1515. + checkTimeRemaining '.updateblock.farms.farms["6"]["2"].water[0].waterremain'
  1516. + local 'sFilter=.updateblock.farms.farms["6"]["2"].water[0].waterremain'
  1517. + sFilter='.updateblock.farms.farms["6"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1518. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1519. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1520. .updateblock.farms.farms["6"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1521. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1522. .updateblock.farms.farms["6"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1523. jq: 2 compile errors
  1524. + local iRemaining=
  1525. + '[' -z '' ']'
  1526. + return 1
  1527. + for POSITION in {1..6}
  1528. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["3"].buildingid | tonumber' farmdata.txt
  1529. + BUILDINGID=
  1530. + '[' '' = NP ']'
  1531. + '[' '' = 0 ']'
  1532.  -lt 4 ]]
  1533. ")syntax error: invalid arithmetic operator (error token is "
  1534. + grep -q 'correctqueuenum = 1' config.ini
  1535. + grep -q 'removeweed = 1' config.ini
  1536. + '[' '' = 19 ']'
  1537. ++ getMaxQueuesForBuildingID
  1538. ++ local iBuildingID=
  1539. ++ case "$iBuildingID" in
  1540. ++ echo 1
  1541. + '[' 1 -eq 3 ']'
  1542. + aSLOTS=0
  1543. + for SLOT in $aSLOTS
  1544. + checkTimeRemaining '.updateblock.farms.farms["6"]["3"].production[0]?.remain'
  1545. + local 'sFilter=.updateblock.farms.farms["6"]["3"].production[0]?.remain'
  1546. + sFilter='.updateblock.farms.farms["6"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1547. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1548. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1549. .updateblock.farms.farms["6"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1550. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1551. .updateblock.farms.farms["6"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1552. jq: 2 compile errors
  1553. + local iRemaining=
  1554. + '[' -z '' ']'
  1555. + return 1
  1556. + '[' 0 -eq 0 ']'
  1557. + checkTimeRemaining '.updateblock.farms.farms["6"]["3"].water[0].waterremain'
  1558. + local 'sFilter=.updateblock.farms.farms["6"]["3"].water[0].waterremain'
  1559. + sFilter='.updateblock.farms.farms["6"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1560. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1561. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1562. .updateblock.farms.farms["6"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1563. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1564. .updateblock.farms.farms["6"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1565. jq: 2 compile errors
  1566. + local iRemaining=
  1567. + '[' -z '' ']'
  1568. + return 1
  1569. + for POSITION in {1..6}
  1570. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["4"].buildingid | tonumber' farmdata.txt
  1571. + BUILDINGID=
  1572. + '[' '' = NP ']'
  1573. + '[' '' = 0 ']'
  1574.  -lt 4 ]]
  1575. ")syntax error: invalid arithmetic operator (error token is "
  1576. + grep -q 'correctqueuenum = 1' config.ini
  1577. + grep -q 'removeweed = 1' config.ini
  1578. + '[' '' = 19 ']'
  1579. ++ getMaxQueuesForBuildingID
  1580. ++ local iBuildingID=
  1581. ++ case "$iBuildingID" in
  1582. ++ echo 1
  1583. + '[' 1 -eq 3 ']'
  1584. + aSLOTS=0
  1585. + for SLOT in $aSLOTS
  1586. + checkTimeRemaining '.updateblock.farms.farms["6"]["4"].production[0]?.remain'
  1587. + local 'sFilter=.updateblock.farms.farms["6"]["4"].production[0]?.remain'
  1588. + sFilter='.updateblock.farms.farms["6"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1589. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1590. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1591. .updateblock.farms.farms["6"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1592. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1593. .updateblock.farms.farms["6"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1594. jq: 2 compile errors
  1595. + local iRemaining=
  1596. + '[' -z '' ']'
  1597. + return 1
  1598. + '[' 0 -eq 0 ']'
  1599. + checkTimeRemaining '.updateblock.farms.farms["6"]["4"].water[0].waterremain'
  1600. + local 'sFilter=.updateblock.farms.farms["6"]["4"].water[0].waterremain'
  1601. + sFilter='.updateblock.farms.farms["6"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1602. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1603. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1604. .updateblock.farms.farms["6"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1605. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1606. .updateblock.farms.farms["6"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1607. jq: 2 compile errors
  1608. + local iRemaining=
  1609. + '[' -z '' ']'
  1610. + return 1
  1611. + for POSITION in {1..6}
  1612. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["5"].buildingid | tonumber' farmdata.txt
  1613. + BUILDINGID=
  1614. + '[' '' = NP ']'
  1615. + '[' '' = 0 ']'
  1616.  -lt 4 ]]
  1617. ")syntax error: invalid arithmetic operator (error token is "
  1618. + grep -q 'correctqueuenum = 1' config.ini
  1619. + grep -q 'removeweed = 1' config.ini
  1620. + '[' '' = 19 ']'
  1621. ++ getMaxQueuesForBuildingID
  1622. ++ local iBuildingID=
  1623. ++ case "$iBuildingID" in
  1624. ++ echo 1
  1625. + '[' 1 -eq 3 ']'
  1626. + aSLOTS=0
  1627. + for SLOT in $aSLOTS
  1628. + checkTimeRemaining '.updateblock.farms.farms["6"]["5"].production[0]?.remain'
  1629. + local 'sFilter=.updateblock.farms.farms["6"]["5"].production[0]?.remain'
  1630. + sFilter='.updateblock.farms.farms["6"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1631. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1632. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1633. .updateblock.farms.farms["6"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1634. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1635. .updateblock.farms.farms["6"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1636. jq: 2 compile errors
  1637. + local iRemaining=
  1638. + '[' -z '' ']'
  1639. + return 1
  1640. + '[' 0 -eq 0 ']'
  1641. + checkTimeRemaining '.updateblock.farms.farms["6"]["5"].water[0].waterremain'
  1642. + local 'sFilter=.updateblock.farms.farms["6"]["5"].water[0].waterremain'
  1643. + sFilter='.updateblock.farms.farms["6"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1644. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1645. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1646. .updateblock.farms.farms["6"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1647. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1648. .updateblock.farms.farms["6"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1649. jq: 2 compile errors
  1650. + local iRemaining=
  1651. + '[' -z '' ']'
  1652. + return 1
  1653. + for POSITION in {1..6}
  1654. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["6"].buildingid | tonumber' farmdata.txt
  1655. + BUILDINGID=
  1656. + '[' '' = NP ']'
  1657. + '[' '' = 0 ']'
  1658.  -lt 4 ]]
  1659. ")syntax error: invalid arithmetic operator (error token is "
  1660. + grep -q 'correctqueuenum = 1' config.ini
  1661. + grep -q 'removeweed = 1' config.ini
  1662. + '[' '' = 19 ']'
  1663. ++ getMaxQueuesForBuildingID
  1664. ++ local iBuildingID=
  1665. ++ case "$iBuildingID" in
  1666. ++ echo 1
  1667. + '[' 1 -eq 3 ']'
  1668. + aSLOTS=0
  1669. + for SLOT in $aSLOTS
  1670. + checkTimeRemaining '.updateblock.farms.farms["6"]["6"].production[0]?.remain'
  1671. + local 'sFilter=.updateblock.farms.farms["6"]["6"].production[0]?.remain'
  1672. + sFilter='.updateblock.farms.farms["6"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1673. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1674. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1675. .updateblock.farms.farms["6"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1676. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1677. .updateblock.farms.farms["6"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1678. jq: 2 compile errors
  1679. + local iRemaining=
  1680. + '[' -z '' ']'
  1681. + return 1
  1682. + '[' 0 -eq 0 ']'
  1683. + checkTimeRemaining '.updateblock.farms.farms["6"]["6"].water[0].waterremain'
  1684. + local 'sFilter=.updateblock.farms.farms["6"]["6"].water[0].waterremain'
  1685. + sFilter='.updateblock.farms.farms["6"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1686. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["6"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1687. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1688. .updateblock.farms.farms["6"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1689. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1690. .updateblock.farms.farms["6"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1691. jq: 2 compile errors
  1692. + local iRemaining=
  1693. + '[' -z '' ']'
  1694. + return 1
  1695. + for FARM in {1..7}
  1696. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms | has("7")' farmdata.txt
  1697. + PLACEEXISTS=$'false\r'
  1698. + '[' $'false\r' = false ']'
  1699. + echo 'Checking for pending tasks on farm 7...'
  1700. Checking for pending tasks on farm 7...
  1701. + for POSITION in {1..6}
  1702. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["1"].buildingid | tonumber' farmdata.txt
  1703. + BUILDINGID=
  1704. + '[' '' = NP ']'
  1705. + '[' '' = 0 ']'
  1706.  -lt 4 ]]
  1707. ")syntax error: invalid arithmetic operator (error token is "
  1708. + grep -q 'correctqueuenum = 1' config.ini
  1709. + grep -q 'removeweed = 1' config.ini
  1710. + '[' '' = 19 ']'
  1711. ++ getMaxQueuesForBuildingID
  1712. ++ local iBuildingID=
  1713. ++ case "$iBuildingID" in
  1714. ++ echo 1
  1715. + '[' 1 -eq 3 ']'
  1716. + aSLOTS=0
  1717. + for SLOT in $aSLOTS
  1718. + checkTimeRemaining '.updateblock.farms.farms["7"]["1"].production[0]?.remain'
  1719. + local 'sFilter=.updateblock.farms.farms["7"]["1"].production[0]?.remain'
  1720. + sFilter='.updateblock.farms.farms["7"]["1"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1721. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["1"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1722. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1723. .updateblock.farms.farms["7"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1724. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1725. .updateblock.farms.farms["7"]["1"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1726. jq: 2 compile errors
  1727. + local iRemaining=
  1728. + '[' -z '' ']'
  1729. + return 1
  1730. + '[' 0 -eq 0 ']'
  1731. + checkTimeRemaining '.updateblock.farms.farms["7"]["1"].water[0].waterremain'
  1732. + local 'sFilter=.updateblock.farms.farms["7"]["1"].water[0].waterremain'
  1733. + sFilter='.updateblock.farms.farms["7"]["1"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1734. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["1"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1735. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1736. .updateblock.farms.farms["7"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1737. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1738. .updateblock.farms.farms["7"]["1"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1739. jq: 2 compile errors
  1740. + local iRemaining=
  1741. + '[' -z '' ']'
  1742. + return 1
  1743. + for POSITION in {1..6}
  1744. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["2"].buildingid | tonumber' farmdata.txt
  1745. + BUILDINGID=
  1746. + '[' '' = NP ']'
  1747. + '[' '' = 0 ']'
  1748.  -lt 4 ]]
  1749. ")syntax error: invalid arithmetic operator (error token is "
  1750. + grep -q 'correctqueuenum = 1' config.ini
  1751. + grep -q 'removeweed = 1' config.ini
  1752. + '[' '' = 19 ']'
  1753. ++ getMaxQueuesForBuildingID
  1754. ++ local iBuildingID=
  1755. ++ case "$iBuildingID" in
  1756. ++ echo 1
  1757. + '[' 1 -eq 3 ']'
  1758. + aSLOTS=0
  1759. + for SLOT in $aSLOTS
  1760. + checkTimeRemaining '.updateblock.farms.farms["7"]["2"].production[0]?.remain'
  1761. + local 'sFilter=.updateblock.farms.farms["7"]["2"].production[0]?.remain'
  1762. + sFilter='.updateblock.farms.farms["7"]["2"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1763. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["2"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1764. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1765. .updateblock.farms.farms["7"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1766. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1767. .updateblock.farms.farms["7"]["2"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1768. jq: 2 compile errors
  1769. + local iRemaining=
  1770. + '[' -z '' ']'
  1771. + return 1
  1772. + '[' 0 -eq 0 ']'
  1773. + checkTimeRemaining '.updateblock.farms.farms["7"]["2"].water[0].waterremain'
  1774. + local 'sFilter=.updateblock.farms.farms["7"]["2"].water[0].waterremain'
  1775. + sFilter='.updateblock.farms.farms["7"]["2"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1776. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["2"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1777. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1778. .updateblock.farms.farms["7"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1779. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1780. .updateblock.farms.farms["7"]["2"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1781. jq: 2 compile errors
  1782. + local iRemaining=
  1783. + '[' -z '' ']'
  1784. + return 1
  1785. + for POSITION in {1..6}
  1786. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["3"].buildingid | tonumber' farmdata.txt
  1787. + BUILDINGID=
  1788. + '[' '' = NP ']'
  1789. + '[' '' = 0 ']'
  1790.  -lt 4 ]]
  1791. ")syntax error: invalid arithmetic operator (error token is "
  1792. + grep -q 'correctqueuenum = 1' config.ini
  1793. + grep -q 'removeweed = 1' config.ini
  1794. + '[' '' = 19 ']'
  1795. ++ getMaxQueuesForBuildingID
  1796. ++ local iBuildingID=
  1797. ++ case "$iBuildingID" in
  1798. ++ echo 1
  1799. + '[' 1 -eq 3 ']'
  1800. + aSLOTS=0
  1801. + for SLOT in $aSLOTS
  1802. + checkTimeRemaining '.updateblock.farms.farms["7"]["3"].production[0]?.remain'
  1803. + local 'sFilter=.updateblock.farms.farms["7"]["3"].production[0]?.remain'
  1804. + sFilter='.updateblock.farms.farms["7"]["3"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1805. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["3"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1806. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1807. .updateblock.farms.farms["7"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1808. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1809. .updateblock.farms.farms["7"]["3"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1810. jq: 2 compile errors
  1811. + local iRemaining=
  1812. + '[' -z '' ']'
  1813. + return 1
  1814. + '[' 0 -eq 0 ']'
  1815. + checkTimeRemaining '.updateblock.farms.farms["7"]["3"].water[0].waterremain'
  1816. + local 'sFilter=.updateblock.farms.farms["7"]["3"].water[0].waterremain'
  1817. + sFilter='.updateblock.farms.farms["7"]["3"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1818. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["3"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1819. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1820. .updateblock.farms.farms["7"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1821. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1822. .updateblock.farms.farms["7"]["3"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1823. jq: 2 compile errors
  1824. + local iRemaining=
  1825. + '[' -z '' ']'
  1826. + return 1
  1827. + for POSITION in {1..6}
  1828. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["4"].buildingid | tonumber' farmdata.txt
  1829. + BUILDINGID=
  1830. + '[' '' = NP ']'
  1831. + '[' '' = 0 ']'
  1832.  -lt 4 ]]
  1833. ")syntax error: invalid arithmetic operator (error token is "
  1834. + grep -q 'correctqueuenum = 1' config.ini
  1835. + grep -q 'removeweed = 1' config.ini
  1836. + '[' '' = 19 ']'
  1837. ++ getMaxQueuesForBuildingID
  1838. ++ local iBuildingID=
  1839. ++ case "$iBuildingID" in
  1840. ++ echo 1
  1841. + '[' 1 -eq 3 ']'
  1842. + aSLOTS=0
  1843. + for SLOT in $aSLOTS
  1844. + checkTimeRemaining '.updateblock.farms.farms["7"]["4"].production[0]?.remain'
  1845. + local 'sFilter=.updateblock.farms.farms["7"]["4"].production[0]?.remain'
  1846. + sFilter='.updateblock.farms.farms["7"]["4"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1847. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["4"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1848. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1849. .updateblock.farms.farms["7"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1850. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1851. .updateblock.farms.farms["7"]["4"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1852. jq: 2 compile errors
  1853. + local iRemaining=
  1854. + '[' -z '' ']'
  1855. + return 1
  1856. + '[' 0 -eq 0 ']'
  1857. + checkTimeRemaining '.updateblock.farms.farms["7"]["4"].water[0].waterremain'
  1858. + local 'sFilter=.updateblock.farms.farms["7"]["4"].water[0].waterremain'
  1859. + sFilter='.updateblock.farms.farms["7"]["4"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1860. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["4"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1861. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1862. .updateblock.farms.farms["7"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1863. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1864. .updateblock.farms.farms["7"]["4"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1865. jq: 2 compile errors
  1866. + local iRemaining=
  1867. + '[' -z '' ']'
  1868. + return 1
  1869. + for POSITION in {1..6}
  1870. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["5"].buildingid | tonumber' farmdata.txt
  1871. + BUILDINGID=
  1872. + '[' '' = NP ']'
  1873. + '[' '' = 0 ']'
  1874.  -lt 4 ]]
  1875. ")syntax error: invalid arithmetic operator (error token is "
  1876. + grep -q 'correctqueuenum = 1' config.ini
  1877. + grep -q 'removeweed = 1' config.ini
  1878. + '[' '' = 19 ']'
  1879. ++ getMaxQueuesForBuildingID
  1880. ++ local iBuildingID=
  1881. ++ case "$iBuildingID" in
  1882. ++ echo 1
  1883. + '[' 1 -eq 3 ']'
  1884. + aSLOTS=0
  1885. + for SLOT in $aSLOTS
  1886. + checkTimeRemaining '.updateblock.farms.farms["7"]["5"].production[0]?.remain'
  1887. + local 'sFilter=.updateblock.farms.farms["7"]["5"].production[0]?.remain'
  1888. + sFilter='.updateblock.farms.farms["7"]["5"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1889. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["5"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1890. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1891. .updateblock.farms.farms["7"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1892. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1893. .updateblock.farms.farms["7"]["5"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1894. jq: 2 compile errors
  1895. + local iRemaining=
  1896. + '[' -z '' ']'
  1897. + return 1
  1898. + '[' 0 -eq 0 ']'
  1899. + checkTimeRemaining '.updateblock.farms.farms["7"]["5"].water[0].waterremain'
  1900. + local 'sFilter=.updateblock.farms.farms["7"]["5"].water[0].waterremain'
  1901. + sFilter='.updateblock.farms.farms["7"]["5"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1902. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["5"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1903. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1904. .updateblock.farms.farms["7"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1905. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1906. .updateblock.farms.farms["7"]["5"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1907. jq: 2 compile errors
  1908. + local iRemaining=
  1909. + '[' -z '' ']'
  1910. + return 1
  1911. + for POSITION in {1..6}
  1912. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["6"].buildingid | tonumber' farmdata.txt
  1913. + BUILDINGID=
  1914. + '[' '' = NP ']'
  1915. + '[' '' = 0 ']'
  1916.  -lt 4 ]]
  1917. ")syntax error: invalid arithmetic operator (error token is "
  1918. + grep -q 'correctqueuenum = 1' config.ini
  1919. + grep -q 'removeweed = 1' config.ini
  1920. + '[' '' = 19 ']'
  1921. ++ getMaxQueuesForBuildingID
  1922. ++ local iBuildingID=
  1923. ++ case "$iBuildingID" in
  1924. ++ echo 1
  1925. + '[' 1 -eq 3 ']'
  1926. + aSLOTS=0
  1927. + for SLOT in $aSLOTS
  1928. + checkTimeRemaining '.updateblock.farms.farms["7"]["6"].production[0]?.remain'
  1929. + local 'sFilter=.updateblock.farms.farms["7"]["6"].production[0]?.remain'
  1930. + sFilter='.updateblock.farms.farms["7"]["6"].production[0]?.remain | if . == 0  then . else empty end') > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1931. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["6"].production[0]?.remain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length then . else empty end' farmdata.txt
  1932. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1933. .updateblock.farms.farms["7"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                                                                                                          
  1934. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1935. .updateblock.farms.farms["7"]["6"].production[0]?.remain | if . == 0 then 0 elif then . else empty end                                                          
  1936. jq: 2 compile errors
  1937. + local iRemaining=
  1938. + '[' -z '' ']'
  1939. + return 1
  1940. + '[' 0 -eq 0 ']'
  1941. + checkTimeRemaining '.updateblock.farms.farms["7"]["6"].water[0].waterremain'
  1942. + local 'sFilter=.updateblock.farms.farms["7"]["6"].water[0].waterremain'
  1943. + sFilter='.updateblock.farms.farms["7"]["6"].water[0].waterremain | if . == 0 t then . else empty end' > 0 and . < 0 then 0 elif (. | length) > 0 and . < 0
  1944. ++ /cygdrive/k/Documents/jq '.updateblock.farms.farms["7"]["6"].water[0].waterremain | if . == 0 then 0 elif (. | length) > 0 and . < 0 then 0 elif (. | length) then . else empty end' farmdata.txt
  1945. jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
  1946. .updateblock.farms.farms["7"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end                                                                                                                                          
  1947. jq: error: Possibly unterminated 'if' statement at <top-level>, line 1:
  1948. .updateblock.farms.farms["7"]["6"].water[0].waterremain | if . == 0 then 0 elif  then . else empty end
  1949. jq: 2 compile errors
  1950. + local iRemaining=
  1951. + '[' -z '' ']'
  1952. + return 1
  1953. + sed -i 's/correctqueuenum = 1/correctqueuenum = 0/' config.ini
  1954. + sed -i 's/removeweed = 1/removeweed = 0/' config.ini
  1955. + '[' $'18\r' -ge 23 ']'
  1956. : integer expression expected8
  1957. + '[' $'18\r' -ge 40 ']'
  1958. : integer expression expected8
  1959. + '[' $'18\r' -ge 42 ']'
  1960. : integer expression expected8
  1961. + '[' $'18\r' -ge 44 ']'
  1962. : integer expression expected8
  1963. + grep -q 'vehiclemgmt5 = 0' config.ini
  1964. + grep -q 'vehiclemgmt6 = 0' config.ini
  1965. + grep -q 'vehiclemgmt7 = 0' config.ini
  1966. + grep -q 'sendfarmiesaway = 1' config.ini
  1967. + grep -q 'sendflowerfarmiesaway = 1' config.ini
  1968. + grep -q 'dodog = 0' config.ini
  1969. + grep -q 'dodonkey = 1' config.ini
  1970. + grep -q 'dopuzzleparts = 1' config.ini
  1971. + grep -q 'redeempuzzlepacks = 1' config.ini
  1972. + grep -q 'dobutterflies = 1' config.ini
  1973. + grep -q 'dodeliveryevent = 1' config.ini
  1974. + '[' $'18\r' -ge 9 ']'
  1975. : integer expression expected8
  1976. + grep -q 'autobuyrefillto = 0' config.ini
  1977. + '[' $'18\r' -ge 49 ']'
  1978. : integer expression expected8
  1979. + grep -q 'doolympiaevent = 1' config.ini
  1980. + grep -q 'docalendarevent = 1' config.ini
  1981. + grep -q 'doseedbox = 1' config.ini
  1982. + '[' $'18\r' -ge 8 ']'
  1983. : integer expression expected8
  1984. + '[' $'18\r' -ge 20 ']'
  1985. : integer expression expected8
  1986. + '[' $'18\r' -ge 11 ']'
  1987. : integer expression expected8
  1988. + '[' $'18\r' -ge 8 ']'
  1989. : integer expression expected8
  1990. + echo 'Logging off...'
  1991. Logging off...
  1992. + WGETREQ 'http://s1.wolnifarmerzy.pl/main.php?page=logout&logoutbutton=1'
  1993. + sHTTPReq='http://s1.wolnifarmerzy.pl/main.php?page=logout&logoutbutton=1'
  1994. + wget -nv -T10 -a mffbot.log --output-document=/dev/null '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0' --load-cookies mffcookies.txt 'http://s1.wolnifarmerzy.pl/main.php?page=logout&logoutbutton=1'
  1995. + rm -f mffcookies.txt farmdata.txt mffbottemp.html /tmp/Eupatorium-823 '/tmp/Eupatorium-823-[5-6]-[1-6]'
  1996. + echo -n 'Time stamp: '
  1997. Time stamp: + date '+%A, %d. %B %Y - %H:%Mh'
  1998. + tee lastrun.txt
  1999. Thursday, 25. March 2021 - 16:07h
  2000. + '[' 1616684823 -ne 0 ']'
  2001. ++ date +%s
  2002. + CURRENTEPOCH=1616684831
  2003. + TIMEDELTA=8
  2004. ")syntax error: invalid arithmetic operator (error token is "
  2005.  
  2006.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement