### Author Topic: [SOLVED] Tunnel Syntax error (2014.0331)  (Read 2832 times)

0 Members and 1 Guest are viewing this topic.

#### DJ Omnimaga

• Former TI programmer
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55838
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### [SOLVED] Tunnel Syntax error (2014.0331)
« on: May 27, 2014, 04:15:04 pm »
Anyone knows why this HP Prime program gives Syntax error in the new HP Prime firmware?

Code: [Select]
EXPORT Tunnel() BEGINDIMGROB_P(G1,340,240);BLIT_P(G1,G0);FOR Z FROM 3 TO 237 STEP 3 DOBLIT_P(G0,0,0,320,240,G1,0,0,320,240-Z);END;1▶C;0▶P;100▶Y;20▶T;128▶L;0▶L1(512);FOR Z FROM 0 TO 16 DORANDOM(100)▶L1(2*Z+1);60-RANDOM(4)▶L1(2*Z+2);END;RECT_P(G1,0,0,319,35,RGB(30,100,255),RGB(30,100,255));TEXTOUT_P("2013 DJ Omnimaga www.omnimaga.org",G1,128,25,1,RGB(255,255,255));FOR Z FROM 0 TO 10 DOTEXTOUT_P("Score:",G1,Z,0,7,RGB(25*Z,255-(25*Z),0),250);TEXTOUT_P("τ υ η η ε ι  ρ ɾ ί м ɛ",G1,122+Z,0,7,RGB(0,25*Z,0),250);END;FOR Z FROM 0 TO 4 DOLINE_P(G1,0,Z+35,319,Z+35,RGB(0,20*Z,0));END;WHILE Y>0 DOFOR Z FROM 0 TO 15 DOC+1▶C;IF C>16 THEN1▶C;END;L1(2*C+2)▶O;L1(2*C+1)▶Q;RECT_P(G1,20*Z,40,20*Z+19,O,RGB(0,50+Q,0),RGB(0,50+Q,0));RECT_P(G1,20*Z,O,20*Z+19,O+L,RGB(100+Q,130,50),RGB(100+Q,130,50));RECT_P(G1,20*Z,O+L,20*Z+19,246,RGB(0,50+Q,0),RGB(0,50+Q,0));IF Z=0 THENRECT_P(G1,0,Y,8,Y+12,RGB(0,0,0),RGB(150,150,255));RECT_P(G1,2,Y+4,14,Y+8,RGB(0,0,0),RGB(255,0,0));IF Y<O OR Y+12>O+L THEN−9▶Y;END;END;END;TEXTOUT_P(P,G1,70,2,6,RGB(0,0,0),200,RGB(30,100,255));TEXTOUT_P(P,G1,72,2,6,RGB(5,255,255));BLIT_P(G0,0,0,320,240,G1,0,0,320,240);P+1▶P;L1(2*C+2)▶S;RANDOM(100)▶U;S+RANDOM(30)-15▶Ans;IF Ans<45 THEN45▶Ans;ELSEIF Ans>213-L THEN213-L▶Ans;END;END;C+1▶C;IF C>16 THEN1▶C;L-1▶L;END;Ans▶L1(2*C+2);U▶L1(2*C+1);Y-(5*ISKEYDOWN(2))+(5*ISKEYDOWN(12))▶Y;END;FOR Z FROM 0 TO 7 DOINVERT_P();WAIT(0.05);END;DIMGROB_P(G1,122,30);BLIT_P(G1,0,0,122,30,G0,0,0,122,30);RECT_P(RGB(30,100,255));REPEAT GETKEY▶Z;BLIT_P(G0,RANDOM(10),RANDOM(10),320-RANDOM(10),240-RANDOM(10),G1,0,0,122,30);WAIT(.02);UNTIL ISKEYDOWN(4)=1 OR ISKEYDOWN(30)=1;END; END;
The syntax error points to the last END; command . The game works perfectly in the previous firmware.

EDIT: Nvm, it appears to work fine without the last End. Not sure why it did work fine on previous firmwares if that END was not necessary, though
« Last Edit: May 27, 2014, 04:33:25 pm by DJ Omnimaga »
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7918
• Rating: +374/-13
• Derpy Hooves
##### Re: [SOLVED] Tunnel Syntax error (2014.0331)
« Reply #1 on: May 28, 2014, 07:59:56 am »
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### Streetwalrus

• LV12 Extreme Poster (Next: 5000)
• Posts: 3821
• Rating: +80/-8
##### Re: [SOLVED] Tunnel Syntax error (2014.0331)
« Reply #2 on: May 28, 2014, 08:07:38 am »
Now that was awesome.

#### timwessman

• LV3 Member (Next: 100)
• Posts: 94
• Rating: +32/-0
##### Re: [SOLVED] Tunnel Syntax error (2014.0331)
« Reply #3 on: May 28, 2014, 08:42:32 am »
There were other situations where you could inadvertently get an extra END inside a subroutine and it wouldn't be complained about, but would be very confusing when tracing through and you'd discover that they weren't paired up. We basically made it slightly stricter to avoid extra END words - especially as I suspect automatic indenting and similar would really not like that.
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

#### DJ Omnimaga

• Former TI programmer
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55838
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: [SOLVED] Tunnel Syntax error (2014.0331)
« Reply #4 on: May 28, 2014, 12:25:23 pm »
Regarding indenting, I try to indent nowadays since I mostly code on the computer. However, when coding on the calc this can be annoying because you don't see as much code on the screen, especially the older TI-83+ models that only shows 8 rows of 16 characters in the program editor and that's with Doors CS7 installed during program debugging, else it only shows 7.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF

#### Hayleia

• Programming Absol
• Coder Of Tomorrow
• LV12 Extreme Poster (Next: 5000)
• Posts: 3367
• Rating: +393/-7
##### Re: [SOLVED] Tunnel Syntax error (2014.0331)
« Reply #5 on: May 28, 2014, 12:48:47 pm »
I don't know if zStart's last update had a 83+ version (other ones had so maybe this one too) but the small font editor allows you to display a lot of chars on the screen
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.34114930033683777, "perplexity": 17381.87554219998}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655890566.2/warc/CC-MAIN-20200706222442-20200707012442-00366.warc.gz"}