Latest Uploads
image-21-0 ... -21-29.jpg

Jayenkai

image-15-0 ... -19-40.jpg

Jayenkai

image-15-0 ... -20-07.jpg

Jayenkai

Bumble Bee

dna

Tires

dna

Guess The Remake

rychan

Forum Home

stream error

UserMessage
Posted : Monday, 24 January 2011, 11:56 | Permalink
dna


With this code

-->

I get a "stream does not exist" error.


-----
DNA
Posted : Monday, 24 January 2011, 12:07 | Permalink | Mark Here
shroom_monk


WW Entries : 8
I haven't tried running the code, but could it be that 'A_FILE' on the last line should be 'A_FILE$'?

-----
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Posted : Monday, 24 January 2011, 12:30 | Permalink | Mark Here
dna


I think Jay mentioned that once it's defined as a string then the dollar sign may be optional.

I'll try it though since that was the syntax method I used mostly during school.

** Nope. The software does the same even with the dollar sign.

** When using FILETYPE(...), is the value returned 1,0,-1?
I'm getting conflicting documentation.

-----
DNA
Posted : Monday, 24 January 2011, 12:32 | Permalink | Mark Here
HoboBen


WW Entries : 9
To be honest it almost impossible to read formatted like that (are the semi-colons Blitz comments?).

What is the code actually meant to do?

-----
Posted : Monday, 24 January 2011, 12:46 | Permalink | Mark Here
dna


Here's the edited code for better reading.
-->

The code reads from two files adds the contents and then writes the information back to a file.

-----
DNA
Posted : Monday, 24 January 2011, 13:59 | Permalink | Mark Here
Teasy


DNA:

Seeking back to start on end-of-file should work exactly as you intended:

-->
stream test 2011-01-24 1c.bb

I see only '2' other thingies that are 'missing' in the code that you posted.
First, the handler for the "." and ".." folder items (which you catch using a filetype check).
Secondly, the check for non-existing files (which is not caught using the same filetype check).

-->
folder entry test 2011-01-24 1c.bb

I have not previously encountered Blitz bugs with file streams (only network streams ^^), so I'm quite sure the problem can be easily traced in your code.
Perhaps if you post some more code, it'll become clearer what's causing the problem.
Perhaps dealing with how handles are closed (and opened), and how files are created, written to, or perhaps deleted, while possibly still being in a loop.

The above 2 programs show various file and folder handling mechanisms that I did not see in your code which I hope you find beneficial

shroom_monk: One of the things I love most about Blitz is that after initial declaration of a variable (e.g. A_FILE$), Blitz no longer demands a identifier's type specification
Similarly: Dim MyArray.MyStruct( .. ) and Global Integer% where % is Blitz's default, which can be omitted entirely
Homepage : http://www.bettiesart.com/tc/contact
Posted : Monday, 24 January 2011, 14:01 | Permalink | Mark Here
shroom_monk


WW Entries : 8
Teasy One of the things I love most about Blitz is that after initial declaration of a variable (e.g. A_FILE$), Blitz no longer demands a identifier's type specification


That's not a good thing! That just encourages sloppy coding!

-----
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Posted : Monday, 24 January 2011, 14:07 | Permalink | Mark Here
Teasy


|edit| *LoL*
A lot of new replies while I was typing! |edit|


DNA: Do you close the 2nd file (F2) somewhere else in the code?
I don't see it being closed in this code (CloseFile).
I also do not see the folder being closed (CloseDir).

-->

shroom_monk: I come from an overly Strict background
Homepage : http://www.bettiesart.com/tc/contact
Posted : Monday, 24 January 2011, 19:46 | Permalink | Mark Here
dna


Here's the entire source for the routine.

-->


-----
DNA
Posted : Tuesday, 25 January 2011, 10:45 | Permalink | Mark Here
dna


These functions you posted are good Teasy. Are there any for font smoothing in B2D?


-----
DNA
Posted : Sunday, 30 January 2011, 11:55 | Permalink | Mark Here
Teasy


yes, there are many, dna
my favorite is my 'textoutline' function, which is kinda slow, but u have full freedom of color choice every frame etc.
and it works the same as Blitz's Text function, with some added parameters for colors.

i've posted my rendering library here:
http://socoder.net/index.php?snippet=25553
which contains that function.

i'll demonstrate its usage in this program:
-->
textoutline demo - the truth is in here 1a.bb

i also created a 'cache text' function
which wraps this in a memory inefficient (^^) system
to maximize the speed.

instead, i recommend the 'lazypro lib' featurette:
the cachedraw library

which works like this:
-->
the rendering happens in a localized way
and completely independently so.
and the cache is only updated
if your specified parameters change.

-->
cachedraw 1b.bb

a real font smoothing function
is for example my 'font shaper live'
also featured in my game called terra colony.

originally written in 2003,
and suited especially
for making fixed-width fonts look great!

this code includes demonstration:
-->
Font Shaper Live 1b.bb

and finally, something really fancy (yet simple),
a dynamic font bitmapper (on the fly)
which takes any fixed or variable width font
and scales and colorizes it to your liking
with 'lazylib' style interface.

code includes demonstration:
-->
flyfontlib 1e.bb

enjoy!
Homepage : http://www.bettiesart.com/tc/contact
Posted : Monday, 31 January 2011, 09:54 | Permalink | Mark Here
dna


Are some of these written in BMax?
I get a memory access violation

** I got most of these to run except for the vari font lib which still gives me a memory access violation.

These work but all have jaggies much worse than the normal B2D loadfont at any size.

The problem I was having entailed having jaggies only around the edge.

-----
DNA
Posted : Tuesday, 01 February 2011, 12:44 | Permalink | Mark Here
Teasy


nope, none for blitzmax.
do u get the error with debug mode turned on?
if so, where does the error occur?
Homepage : http://www.bettiesart.com/tc/contact
Posted : Wednesday, 02 March 2011, 19:57 | Permalink | Mark Here
dna


I got the font to display but it is not pretty like your terra colony.
Perhaps something I'm not setting?


-----
DNA
Latest Posts
NSFW : Boobage
steve_ancell Mon 19:49
Jinxt3r Smartwatch
Kuron Mon 19:27
Going out of town
steve_ancell Mon 15:37
Pebble Watch Clocks
rychan Mon 06:22
NerdBlock
rockford Sun 12:06
Temporary Fix : iOS8 Image Uploading
Jayenkai Sun 06:44
Movies : Pride
Jayenkai Sat 07:29
WaterFox
steve_ancell Sat 07:25
Batch Recolouring Images
rockford Sat 05:43
Static Molly
steve_ancell Fri 11:25
More

Latest Items
Blog : Bedroom 2.0
Jayenkai Fri 06:01
Blog : 20 Years Ago....
steve_ancell Mon 15:28
Life : Back Online
Kuron Tue 11:48
Showcase : Munky Blocks DX
Jayenkai Mon 07:06
Showcase : Little Nemo's Nightmare
Jayenkai Sat 04:14
News : Newsletter #234
rychan Fri 08:02
Showcase : Space Rocket Adventurers
HoboBen Thu 16:56
Blog : Health Update : August 2014
Jayenkai Sat 11:31
Techy : Back from Game Dev Con!
Jayenkai Sun 16:52
Family : Sunday
Jayenkai Wed 03:31
Family : Good News (for once)
Kuron Tue 15:37
Showcase : Don't Tap The Zombies
therevillsgames Mon 16:26
Showcase : Mutant Monty
steve_ancell Wed 19:26
Techy : New Laptop!?
Kuron Fri 15:52
Showcase : Ascension 2 Live Wallpaper
CodersRule Fri 13:48
More

Who's Online
Kuron
Mon, at 20:13
steve_ancell
Mon, at 20:01
dna
Mon, at 19:25
blanko1324
Mon, at 19:07
Jayenkai
Mon, at 18:19
HoboBen
Mon, at 16:40
rockford
Mon, at 15:19
spinal
Mon, at 14:24
rychan
Mon, at 14:11
shroom_monk
Mon, at 10:46
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.