28 January 2018, 00:29 | #101 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
|
That will happen when the PortSigBit() function is missing - the compiler thinks it's an array instead. AmiBlitz includes all the main libraries by default, but the basic installation of Blitz 2 only includes the core libraries. PortSigBit() is in the RIMiscLib, which is included as an optional extra IIRC. You'll need to add it to your installation, or else install the Ultimate Blitz CD, which should include all those libraries from the start.
|
28 January 2018, 09:55 | #102 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
Thanks for clarification however I did install BSS after one of your previous posts.
Now I rechecked for RIMiscLib and found it in: - blitzLibs: otherLibs/ - blitzLibs: RILIBS/ It was missing from: blitzLibs:USERLIBS, so I put it there too. Anyway I still have the same error msg |
28 January 2018, 12:27 | #103 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
|
Hmmmm, did you use the updated installer from Aminet? The libraries in Blitz need to be "built" into a libraries file before they can be used. What size is your Deflibs file? Mine is 274,284 bytes. If yours is much smaller than that, it would appear that you're still using the default version.
|
28 January 2018, 13:03 | #104 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
deflib size: 373,212 - I think I'm going to remove everything and just install it again.
I'm still experiencing these graphics problems that I mentioned before - so I think it might be related too. Below is a better example. I just strated the program 3 times in a row and everytime these "glitches" were in different places (some of them I marked in red circles) Window no.4 shows different problem: afetr using WCLS the top line (just under the bar) remains (window has a GIMMEZEROZERO flag) I hope all will be fixed after reinstall. Thanks. |
28 January 2018, 14:08 | #105 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
|
There are a lot of interesting questions in this thread but all in the same pile is very difficult to search. Please, why not a thread each question?
|
28 January 2018, 18:19 | #106 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
I think, you are right - especially that part about incorrect installation doesn't fit in here.
I'm going to start a new thread. Thanks. |
29 January 2018, 09:58 | #107 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
|
Hmmm, okay, the glitches are strange, but I think it might be something like a mismatch of bit depths. If you blit to a bitmap that has more bitplanes than your shape, the extra bitplanes will be filled with garbage, causing glitches in certain colours. There are ways around it, but the simplest is to make sure everything is the same depth.
|
29 January 2018, 10:30 | #108 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Yep, I also vote for separate threads!
|
20 February 2018, 17:46 | #109 |
Registered User
Join Date: Jun 2014
Location: Leeds
Posts: 174
|
Sorry very basic question. When would you use arrays and can someone give me example of an array.
Cheers |
21 February 2018, 10:25 | #110 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
|
Arrays are useful where it makes sense to have multiples of the same variable, each of which you can access individually. One example is player health in a game. If it's a single player game, you might just need one health variable, called "Health". If it's a multiplayer game, you could use two separate variables, e.g. P1Health and P2Health, but it might be more useful to create an array instead. This will let you access the healths based on an index, so instead it would look like Health(1) and Health(2). Lives, for example, can follow the same principle in their own array. The advantage of this is that you can use the same code for both players, typically in a loop:
Code:
For Current_Player = 1 To 2 ; Do all your moving etc. for the first player If Player_Hurt Health(Current_Player) - 10 ; Now check if the player is dead, take away a life and resurrect them if so If Health(Current_Player) <= 0 Lives(Current_Player) - 1 Health(Current_Player) = 100 End If End If Next Current_Player Code:
Dim Health(2), Lives(2) Code:
NPrint Player(Current_Player)\health NPrint Player(Current_Player)\lives NPrint Player(Current_Player)\score |
21 February 2018, 22:57 | #111 |
Registered User
Join Date: Jun 2014
Location: Leeds
Posts: 174
|
Thank you. I understand a bit better now.
|
31 March 2018, 16:15 | #112 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
Hi again.
That is going to be basic question. Let's say I have a macro in my code. Let's say there is a syntax error in my macro. Let's say my macro is quite big and complicated. How do I know where the error exactly is? After pressing "Compile and run" I get a msg: "SYNTAX ERROR" and the blitz is pointing to the line where I call my macro from and not to the problematic line in the macro. Thanks. ------ It was not easy but I found it: Was "\" instead of "/" Last edited by peceha; 31 March 2018 at 20:03. |
01 May 2018, 23:38 | #113 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
|
Corruption in loaded BitMap
So, my remake of Asteroids breaks cover. Or, at least a littie bit. The concept is "asteroids using pictures of actual asteroids from spacecraft I have flown". I'm pushing definitions a bit here and am including comets. Anyway, I can get 67P/Churyumov-Gerasimenko bouncing merrily around the screen well enough. I wanted to have some nice backdrops of a similar theme so wanted to have Mars in the background. I created the image in PPaint, saved it as ILBM, but get this weird banding. The colours are all wrong, I suspect that's to do with palettes, which I haven't yet entirely worked out.
Do I need to save the background in any sort of special format? It looks almost interlaced. Screengrab from winuae (standard A1200 conf) and source files attached. |
02 May 2018, 08:16 | #114 |
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
|
( PPaint or DPaint ) If the stencil is turned off and picture saved back Mars looks OK in Blitz. PaintShopPro, IrfanView, Maptapper (win) or MultiView, PPShow (ami) didn't show the original correctly either.
Last edited by clenched; 02 May 2018 at 17:44. Reason: add programs that didn't display picture correctly |
02 May 2018, 11:12 | #115 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
|
Thanks, I'll give it a go without stencils, once I've worked out what that is
|
08 June 2018, 02:56 | #116 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Has anyone succeeded in cycling colors of background bitmap when using ocs dualplayfield with displaylibrary?
No matter what I do I always get only colors in front to unintentionally cycle... |
10 June 2018, 02:34 | #117 |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
Is there any command to leave a loop? (Either a While or a For) ?
|
10 June 2018, 07:46 | #118 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
I haven't found one, been looking for the same. Maybe you can use a Goto to jump to a label just outside of the loop? I have no idea if that would "break" anything. Somebody more of an expert on BB will probably answer.
|
10 June 2018, 08:09 | #119 | |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
Quote:
For the while, I end up using another variable on the While condition, and change it when I want to leave the loop.. but this adds a new check every iteration of the loop. There should be some smarter way to do it. NEW QUESTION: Is there some way to create an "array of subroutines"? Like, I have 20 subroutines (each one under a different label), and I want to execute one depending upon the value of a variable. So instead of using a Code:
Select AAA case 0 gosub routine0 case 1 gosub routine1 ... case 19 gosub routine19 End Select Could I just use something like Code:
GOSUB routine(A) |
|
10 June 2018, 08:52 | #120 | |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Quote:
The user guide for BB2.1 suggests Goto but that Pop must be used for some loops: Code:
Pop Gosub | For | Select | If | While | Repeat Sometimes, it may be necessary to exit from a particular type of program loop in order to transfer program flow to a different part of the program. Pop must be included before the Goto which transfers program flow out from the inside of the loop. Actually, Pop is only necessary to prematurely terminate Gosubs, Fors and Selects. If, While and Repeat have been included for completeness but are not necessary. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitz basic 2 Help | Havie | Coders. Blitz Basic | 30 | 08 September 2013 09:15 |
blitz basic | petza | request.Apps | 11 | 08 April 2007 01:49 |
Blitz Basic 2 anyone? | jobro | request.Apps | 12 | 28 November 2005 18:15 |
Blitz Basic StopCD32 | Tony Landais | Coders. General | 2 | 08 May 2003 22:51 |
Blitz Basic 2 | LaundroMat | Retrogaming General Discussion | 5 | 24 July 2001 08:10 |
|
|