English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 28 January 2018, 00:29   #101
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,750
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.
Daedalus is online now  
AdSense AdSense  
Old 28 January 2018, 09:55   #102
peceha
Registered User

peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 41
Posts: 89
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
peceha is offline  
Old 28 January 2018, 12:27   #103
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,750
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.
Daedalus is online now  
Old 28 January 2018, 13:03   #104
peceha
Registered User

peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 41
Posts: 89
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.
peceha is offline  
Old 28 January 2018, 14:08   #105
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 469
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?
tolkien is offline  
Old 28 January 2018, 18:19   #106
peceha
Registered User

peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 41
Posts: 89
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.
peceha is offline  
Old 29 January 2018, 09:58   #107
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,750
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.
Daedalus is online now  
Old 29 January 2018, 10:30   #108
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 212
Yep, I also vote for separate threads!
MickGyver is offline  
Old 20 February 2018, 17:46   #109
Jackoland
Registered User

 
Join Date: Jun 2014
Location: Leeds
Posts: 156
Sorry very basic question. When would you use arrays and can someone give me example of an array.

Cheers
Jackoland is offline  
Old 21 February 2018, 10:25   #110
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,750
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
To use an array, it must first be defined. This is done using the Dim statement, and defines how many elements to create in the array. So to set up the two arrays above for 2 players:

Code:
Dim Health(2), Lives(2)
That's about it really. There are other types of arrays, but that's the most basic arrangement. There are also ways to combine multiple attributes in a single variable that are useful, then you can do things like

Code:
NPrint Player(Current_Player)\health
NPrint Player(Current_Player)\lives
NPrint Player(Current_Player)\score
So you have just one array with multiple entries for different properties. They're called "Newtypes", but get used to simple arrays first
Daedalus is online now  
Old 21 February 2018, 22:57   #111
Jackoland
Registered User

 
Join Date: Jun 2014
Location: Leeds
Posts: 156
Thank you. I understand a bit better now.
Jackoland is offline  
Old 31 March 2018, 16:15   #112
peceha
Registered User

peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 41
Posts: 89
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.
peceha is offline  
Old 01 May 2018, 23:38   #113
E-Penguin
Banana

 
Join Date: Jul 2016
Location: Darmstadt
Posts: 486
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.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	30
Size:	63.9 KB
ID:	58038  
Attached Files
File Type: rar Test.rar (22.0 KB, 7 views)
E-Penguin is offline  
Old 02 May 2018, 08:16   #114
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 603
( 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
clenched is offline  
Old 02 May 2018, 11:12   #115
E-Penguin
Banana

 
Join Date: Jul 2016
Location: Darmstadt
Posts: 486
Thanks, I'll give it a go without stencils, once I've worked out what that is
E-Penguin is offline  
AdSense AdSense  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.08462 seconds with 15 queries