Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Brian Alvarez on July 31, 2019, 01:49:03 PM
-
Hello Charles, i am almost done with my excersize clone of Dr Mario.
But im having trouble with a stray comma that i dont see. Can you take a look? It was compiling
fine and when i added something it suddenly broke.
I tries attaching a sample of the PowerBASIC compilation, but i couldnt because of the size.
Until a few changes ago... it was compiling fine also for Oxygen... but no more. :(
Help? By the way... comparisons still return 1.
-
By itself this line doesnt cause any problems:
sprframe = (CHOOSE(offframe + 1, INT {1, 2, 3, 2}, countof))
But something else in my program caused it to start complaining about this:
ERROR: ERROR: stray comma:
WORD: ,
IN: dlgproc
LINE: 3076
FILE: "main source
-
Attached is a playable demo of this code. This one is compiled in PowerBASIC,
but until a couple hours ago it was running fine on oxygen as well...
Note: it is unfinished.
-
Something goes wrong in line 2221...
IF ( area.lng(area.m(x,i), (0)).color = area.lng(area.m(x,y), (0) ) THEN
-
Hi Brian,
as long as I do not understand the diagnostic tools of Charles, I can only let me lead by the error messages. This is what I have done (I did not look much at the code, this is too much for me at the moment):
commented out line 4 and line 6 ($ filename .. / uses rtl32) - I run the code directly
commented out line 3076: sprframe = (CHOOSE(offframe + 1, INT {1, 2, 3, 2}, countof))
commented out line 3093: sprframe = (CHOOSE((offframe + 1), INT {5, 6}, countof))
replaced all GetModuleHandle with ¤GetModuleHandle (1539, 3009-3013)
Now I can see at least the (empty) window of the app and hear the sound of the .mid file. I assume something in function CHOOSE does not work properly.
Roland
-
Gahhhh!! im blind!!
Thanks Charles! :o
-
Now I can see at least the (empty) window of the app and hear the sound of the .mid file. I assume something in function CHOOSE does not work properly.
Arnold, i posted a playable version, in case you want to try it. Its very limited, i have only been working on it for a little bit. I need to go out now, but i hope tonight i can post an update. :)
-
Another similar around line 2422
IF (area.lng(area.m(i,y), (0)).color=area.lng(area.m(x,y), (0)) THEN
-
Another similar around line 2422
I found dozens Charles... i think my engine is acting dumb. :o
-
Fixed the engine for the wrong generation of .color, but the original problem still remains. In fact, i believe Oxygen was
compiling it correctly even with that error before (So, Arnold is correct, it compiles when removing CHOOSE).
Attached the code, because it is now over 10000 characters and the forum doesnt allow me to put it between code tags.
-
Okay, I'm off to bed.
I traced it by insertions of this expression as bug bait:
int g={1,2,3}
-
If i comment out the code from BlockFell() and part of the code
from Destroyed()... it all works fine, but loses that functionality.
In fact, if i remove anything, just to make the code smaller, it sometimes
compiles fine. The attached executable was compiled with oxygen...
but doesnt work like the other one.
-
I've updated oxygen.dll to trap those expression nesting errors on the line. (OxygenProgress.zip). I think there were about 7 in all.
-
Brian
you started self-destruction sequence ;D ;D ;D
one thing stray comma is a very powerful enemy
when you use o2 you must not think in a power basic way with whole bunch of UDT-s
-
Is it really necessary to have custom AND,OR NOT ?
gee i cannot recognize what kind of programming language is that .
:o
-
Is it really necessary to have custom AND,OR NOT ?
Current AND and NOT operators work finw with 32bit or smaller variabless, but
Try them with QUADS and see what happens.
-
I've updated oxygen.dll to trap those expression nesting errors on the line. (OxygenProgress.zip). I think there were about 7 in all.
Thanks Charles, oxygen now is reporting some errors i made in my code, i will fix them to see if
that allows me to compile the game. :)
-
Success!! With this update it is now compiling perfectly good. :)
Thanks Charles!