27 January 2024, 21:52 | #1 |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
No Variable Space-HELP
Hello Friends, I am at the very end of completing Geo's Quest Gateway to Nowhere (GQ3) and I have run into a no variable space error in the Grac2 editor. I can't continue. I checked the Amos source Edmond Clay provided in his distribution in AmosPro and see his Buffer was set at 100k. So I expanded it to 150k saved it and tried to compile it to a new WB executable but no luck. Is there anyone out there that could lend a hand, check the source, expand the buffer and compile a new working WB editor for me. I am so close to completing these next 3 chapters but can't go forward. It is the Edmond Clay GRAC2 release which includes all the AMOS source code. The source is the Graceditor2 code that the set buffer needs to be increased and then a new wb executable compiled. I am still just a rookie with AMOS (which is why I have been using Grac2) Thanks
Last edited by pngcan; 27 January 2024 at 22:33. |
28 January 2024, 17:26 | #2 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
|
28 January 2024, 18:40 | #3 |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
Hello adrazar, no I had no success in compiling it; unfortunately it just hangs. I tried running it from Amos but I keep getting a no extensions loaded error. I thought the source code Edmond provided was compete. Alas I am just getting my feet wet again in Amos after some 25, 30 years and I am a bit lost in this process at this point. Which is why for now I have been using Grac2. I have reached out to the gentlemen who are upgrading Grac to Grac 3 in hope they can assist as well.
|
28 January 2024, 22:07 | #4 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
I just tried compiling the program and got the same problem as you. I can run it from the editor though. Do you have the "AMOSPro Compiler extension V 2.00" installed (right click > AMOS > About Loaded Extensions)? I skimmed through the code and saw only regular commands except two coming from that extension (Squash/Unsquash). I'm a bit curious about why the compilation fails and would like to have a look into that, but perhaps not today
|
30 January 2024, 00:51 | #5 |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
Hello Adrazar, yes I have the lib in the extensions folder, but it is not showing up in AMOS,Oddly, my Set Editor Setup function won't load to install it. Looks like I have a bad install of pro 2.0, or it may be a conflict with my pi4.0 setup. I'm going to try it on another non pistorm 1200 to see if I get the same problems.
|
31 January 2024, 14:53 | #6 |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
Well I reloaded AMOSpro 2.0 and I too can run the editor in AMOS now. Unfortunately it still will not compile, it gets to about 80% and then hangs. However, I can run the editor in AMOS and it will allow me to continue writing scripts with the buffer expanded. So although somewhat cumbersome, I can finish GQ3 this way.
|
20 February 2024, 20:07 | #7 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
I now know what is throwing the compiler off the rails!
This is a condenced excerpt from the SCRIPT procedure: Code:
Proc SCRIPT Procedure SCRIPT If(S=3 or S=4 or S=6 or S=7 or S=9 or S=12 or S=62 or S=15 or S=10 or S=53 or S=54 or S=67) and NO<50 Else If S=86 Else If(S=5 or S=25 or S=36 or S=37 or S=38 or S=39 or S=42 or S=69) and NO<50 Else If(S=5 or S=25 or S=36 or S=37 or S=38 or S=39 or S=42 or S=69) Else If S=8 and NO<50 Else If S=8 and NO>200 Else If S=11 Else If S=90 Else If(S=13 or S=44 or S=103 or S=110) and NO<50 Else If S=21 or S=22 Else If S=48 or S=74 or S=87 Else If S=78 Else If S=56 or S=57 or S=58 or S=59 or S=61 or S=64 Else If S=70 or S=80 or S=92 and NO<50 Else If S=18 or S=28 Else If S=95 or S=97 Else If S=109 and NO<50 Else If S=112 and(NO<50 or NO>200) End If End Proc It is possible to fix the problem by replacing some of the long or-or-or expressions with shorter expressions. So one solution is to simplify/rewrite this part of the code. The problem can also be solved by increasing the size of one of the internal buffers that the compiler is using during compilation. I suppose this is the better option here, because you didn't write the code in the first place. It can be done fairly easily from AMOS by running the following program: Code:
FILE$="AMOSPro_System:APSystem/APCmp" Open In 1,FILE$ SIZE=Lof(1) Close 1 If SIZE<>$7358 Then Print "Wrong file size"; : End Reserve As Work 10,SIZE Bload FILE$,Start(10) Poke Start(10)+$486,$20 Bsave FILE$,Start(10) To Start(10)+SIZE Last edited by adrazar; 09 March 2024 at 18:26. Reason: Replace second Bload with Bsave |
21 February 2024, 00:55 | #8 |
Hobby/Indie gamedev
Join Date: Jan 2015
Location: Southern Sweden
Posts: 110
|
I don't know what the code does (Edit: ever mind all this perhaps, if not your code), but if it deals with something like terrain collision, you could try adding some tile meta data in an array or byte bank to clarify what type each tile is (maybe using data statements), then:
Code:
Underfoot = Map(px,py) TerrainType = WhatTypeIsThisTile(Underfoot) Code:
Gosub SWITCH SWITCH: Trap Goto TerrainType+100 : Rem Can add+100 or +whatev if needed If ErrTrap Then Print "Out of Bounds / Default." : Return 100 Print "Lake" : Return 101 Print "Rock" : Return 102 Print "Tree" : Return Return Alternatively you can structure your tiles in a way... like split all impassable tiles into 0-127, then roads in a group of 16, etc, special items at 240-255. Then one can easily use bitshifts and masks, or just division and subtraction to figure out the meta data from that. It saves memory since you don't need a lookup table like above. Edit: Just realized AMOS Pro has: Code:
On X Goto ROCK, LAKE, TREE Last edited by Arne; 21 February 2024 at 18:48. Reason: code tag |
22 February 2024, 19:18 | #9 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
Quite sure nobody in this thread wrote this code
I haven't looked into what S stands for, but since this is a point-and-click adventure game editor, I think it is likely to be related to button selections. However your suggestion with creating a lookup-table makes sense regardless of the meaning of S. Indeed I would have done just that (a lookup-table) if I were to simplify this code Why not just do it Code:
Dim T(110) Global T() T(3)=1 : T(4)=1 : T(6)=1 : T(7)=1 : T(9)=1 : T(10)=1 : T(12)=1 : T(15)=1 : T(53)=1 : T(54)=1 : T(62)=1 : T(67)=1 T(5)=2 : T(25)=2 : T(36)=2 : T(37)=2 : T(38)=2 : T(39)=2 : T(42)=2 : T(69)=2 T(13)=3 : T(44)=3 : T(103)=3 or T(110)=3 T(21)=4 : T(22)=4 T(48)=5 : T(74)=5 : T(87)=5 T(56)=6 : T(57)=6 : T(58)=6 : T(59)=6 : T(61)=6 : T(64)=6 T(70)=7 : T(80)=7 : T(92)=7 T(18)=8 : T(28)=8 T(95)=9 : T(97)=9 Proc SCRIPT Procedure SCRIPT T=T(S) If T=1 and NO<50 Else If S=86 Else If T=2 If NO<50 Else End If Else If S=8 and NO<50 Else If S=8 and NO>200 Else If S=11 Else If S=90 Else If T=3 and NO<50 Else If T=4 Else If T=5 Else If S=78 Else If T=6 Else If T=7 and NO<50 Else If T=8 Else If T=9 Else If S=109 and NO<50 Else If S=112 and(NO<50 or NO>200) End If End Proc I always do such things with On N ..., but the creative solution you presented first seems to have some benefits... (On N ... can only handle a limited number of labels, and using On N ... I usually require N to be able to take on *all* values in a given range (to avoid having to use dummy labels)...) |
18 April 2024, 00:01 | #10 | |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
Quote:
Thanks very much adrazar for all your effort in this matter. Sorry it took me so long to get back, unfortunately I haven't been well. I followed your suggested code to increase the buffer in the compiler only changing the FILE$ to see the directory my AMOS load has APCmp in and alas I keep getting a script error both in test & run. I even created a directory "AMOSPRO_System:APSystem and moved the file into there but still the same script error message. Here is my script: Am I missing something? |
|
18 April 2024, 18:57 | #11 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
Meaning the program says "Wrong file size? That would imply we haven't got the same binary for the compiler. Here is one with the right size:
https://github.com/AOZ-Studio/AMOS-P...APSystem/APCmp |
18 April 2024, 22:06 | #12 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
By the way, there's one error in the picture you posted; last line should read
Code:
Bsave FILE$,Start(10) To Start(10)+SIZE |
21 April 2024, 21:06 | #13 | |
Registered User
Join Date: Apr 2020
Location: USA
Posts: 89
|
Quote:
Thank you my friend, you are master of all that is Amos It worked, I have a new grac2editor with a buffer of 1000k and can now continue with the completion of GQ3 - Gateway to Nowhere without having to run it through Amos. Thank you again |
|
21 April 2024, 22:24 | #14 |
Registered User
Join Date: Feb 2017
Location: Oslo
Posts: 91
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SDL_PATH_DSP environment variable | justinhaynes | support.FS-UAE | 6 | 04 December 2021 01:07 |
Variable injection? | solarmon | support.WinUAE | 12 | 20 January 2019 12:05 |
[Found: Space Baller] Bouncing ball in space? | Kada | Looking for a game name ? | 23 | 06 April 2018 03:10 |
Join variable and string in scripts. | olesio | support.Apps | 3 | 31 January 2013 11:44 |
Variable Master Clock | wiltshireguyuk | request.UAE Wishlist | 0 | 13 December 2004 16:40 |
|
|