The following warnings occurred:
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval




Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 274
» Latest member: zxspecticle
» Forum threads: 1,086
» Forum posts: 6,487

Full Statistics

Online Users
There are currently 159 online users.
» 0 Member(s) | 158 Guest(s)
Bing

Latest Threads
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 214
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 486
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 1,302
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,392
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,080
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,080
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,179
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 630
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 1,218
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,382

 
  Optimiser level 3 bug found (*solved*)
Posted by: LCD - 2012-11-28, 10:25 AM - Forum: Bug Reports - Replies (8)

Hi Boriel!
I just ran into a bug with this code:

Code:
paper 7:ink 0:border 7:cls Function code2level() as ubyte dim adr as uinteger dim count as ubyte adr=@buffer count=0 do if not (peek(Uinteger,adr)-peek(Uinteger,@inpstring+3)+peek(Uinteger,adr+2)-peek(Uinteger,@inpstring+5)+peek(Uinteger,adr+4)-peek(Uinteger,@inpstring+7)) goto passok Else count=count+1:adr=adr+6 end if loop until count=32 count=255 passok: return count end function print code2level() End inpstring: asm defb 1,1,56 defm "Leveld" end asm buffer: asm defm "Level1" defm "Level2" defm "Level3" defm "Level4" defm "Level5" defm "Level6" defm "Level7" defm "Level8" defm "Level9" defm "Level0" defm "Levela" defm "Levelb" defm "Levelc" defm "Leveld" defm "Levele" defm "Levelf" defm "Levelg" defm "Levelh" defm "Leveli" defm "Levelj" defm "Levelk" defm "Levell" defm "Levelm" defm "Leveln" defm "Levelo" defm "Levelp" defm "Levelq" defm "Levelr" defm "Levels" defm "Levelt" defm "Levelu" defm "Levelv" end asm
Without Optimiser or at level 1 or 2 it displays the correct value (13), but with Optimiser level 3 it runs through all the strings aot finding the correct one, so the output is 255 which here means "code not found".

Print this item

  Bit shift bug. (*solved*)
Posted by: britlion - 2012-11-17, 04:16 PM - Forum: Bug Reports - Replies (5)

Bit shift by 0, when 0 is from a variable=0, which is incorrect!


Code:
DIM num as uByte=1 DIM num2 as uByte=0 PRINT num PRINT (num<<0) PRINT (num<<num2)

All three lines should read "1"

Print this item

  Print String Bug (*solved*)
Posted by: britlion - 2012-11-12, 11:41 PM - Forum: Bug Reports - Replies (14)

Confirmed - this demonstrates it. zxb 1.3.0-s928

Code:
DIM score as uLong SUB displayScore(amount as ulong) ink 2 dim a$ as string a$="000000"+STR$(amount) print at 12,12;a$(LEN a$-7 TO);"#" END SUB FOR score= 0 to 1000000 step 10 displayScore(score) NEXT score

Should print a string, followed by a # - but the # ends up printing OVER the prior string, not after it and then on the next line and all over the place - the printed string seems to print beyond where it should. Seems to work on some numbers - so perhaps it's a STR$ bug? Though I think I've seen it on non STR$ stuff.


I just spent ages recompiling Berksman trying to find where on earth it was printing blank data across half the screen Smile - It was the print line above! Not my fault!

Print this item

  Not so much a bug, as slow!
Posted by: britlion - 2012-11-11, 05:05 PM - Forum: Bug Reports - Replies (24)

This program was posted on the WOS forums:

Code:
For x=-100 To 100 For y=-100 To 100 If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y Next y Next x

And if run as is, takes about 9 seconds in Basic, I think.

As ZX Basic:

Code:
FUNCTION t() as uLong asm DI LD DE,(23674) LD D,0 LD HL,(23672) EI end asm end function DIM x,y as integer DIM time as uLONG time=t() For x=-100 To 100 For y=-100 To 100 If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y END IF Next y Next x time=t()-time print CAST(float,time)/50

It takes 53 seconds!

Print this item

  Label as a string var
Posted by: oblo - 2012-11-06, 09:56 PM - Forum: ZX Basic Compiler - Replies (3)

Hi all

Long time no see around here :oops: but now I'm getting some free time to spend with ZX Basic, so I hope to come more often Smile
In fact, I have a question: I want to store a label name in a variable, in order to do GOSUBs using a var, not fixed names. I made this code so far, but it fails with the message 'identifier 'eti$' is a var, not a label':

Code:
#INCLUDE <keys.bas> paper 0: border 0: ink 7: cls dim eti$ eti$="l01" while 1=1 if Multikeys(KEY1)<>0 then eti$="l01" gosub eti$ elseif Multikeys(KEY2)<>0 then eti$="l02" gosub eti$ elseif Multikeys(KEY3)<>0 then eti$="l03" gosub eti$ end If end While l01: print at 0,0;ink 1;"ESTAS EN LA ETI1"; RETURN l02: print at 0,0;ink 2;"ESTAS EN LA ETI2"; RETURN l03: print at 0,0;ink 3;"ESTAS EN LA ETI3"; RETURN

Can be it done or what I'm asking is impossible right now? Note that I'm asking for a string, not numbers.

Thanks and regards

Print this item

  Default Strings
Posted by: compiuter - 2012-11-05, 11:07 AM - Forum: Wishlist - Replies (1)

I don´t know about the default strings, but old compilers had options to select string length, my question is about effect of retail length of strings. Example: DefaultShort=8 chars DefaultLong=32 chars.
What do you think of this?

Print this item

  Some glitches (*solved*)
Posted by: LCD - 2012-10-13, 08:38 PM - Forum: Bug Reports - Replies (12)

So, I found some glitches again.
1. In Optimisation modes when procedures (e.g. dummy procedures for ASM containers as used in BeepFX) are not called, ZXBC shows a warning that procedures are not used, but exit with exitcode 1 (Error).
2. Assigning part of String variables do not work. Compiler says, Variable is not Array, but in Sinclair BASIC it works. This example changes string "Test188" to "Tezt188".

Code:
10 LET a$="Test188" 20 PRINT a$(3) 30 LET a$(3)="z" 40 PRINT a$
3. This crases the Spectrum when compiled:
Code:
z=CODE(INKEY$)

Print this item

  DIM var ... AT @address (*solved*)
Posted by: LCD - 2012-10-11, 09:56 PM - Forum: Bug Reports - Replies (7)

Hi Boriel.
The Address of a label or variable is afaik a constant (@label/@variable), so I wonder why it is not possible to use it in the DIM:

Code:
DIM variable AS UINTEGER AT @label
is rejected by the compiler.
I understand why it would reject variables, even if this would be useful, but @labels or @variablenames should be IMHO not rejected. I just noticed the saved space when using DIMed variable to a adress and then equation label=variable over POKE UINTEGER @label,value. Used this technique in "Yumiko in the haunted Mansion" to read and write frames counter system variable. This made a lot stuff simpler.

Print this item

  Cooming 2013: "Yumiko in the haunted Mansion"
Posted by: LCD - 2012-10-03, 07:38 PM - Forum: Gallery - Replies (35)

I'm currently working on a survival horror game for the Spectrum. Today posted two screenshots of the game in my forum:
<!-- m --><a class="postlink" href="http://lcd.forenworld.at/viewtopic.php?f=14&t=32">http://lcd.forenworld.at/viewtopic.php?f=14&t=32</a><!-- m -->
Yumiko is not Nanako! Yumiko has no sex appeal. And Yumiko is not alone in a haunted mansion...
The lightning effect is working well and fast enough. The game mechanic is finished until I can find some bugs, and no levels designed yet.
The "Death" sequence is disturbing, I promise! Imagine a tentacle grabing this girl foot and pulling her out of the visible field.
Yumiko game is not suitable for children who fear darkness! In fact even some adult had nightmares after playing the test level. I had not a good feeling to let a little girl walking alone in a nightie in a demonic mansion at night, but it looks like it works Wink.

Print this item

  Randomize problem? (*solved*)
Posted by: na_th_an - 2012-09-27, 11:52 AM - Forum: Bug Reports - Replies (7)

I've searched the forums about this issue but I haven't found anything.

I gather that RANDOMIZE uses the timer to seed the variable, doesn't it? So this program, depending on the time I take to press the key, should render different numbers. Well, the result is always 6.

Code:
Print "PRESS KEY": Pause 0 Randomize Let a = Int (Rnd * 10) Print a

If I try...

Code:
''' Dim a as uByte Dim b as uByte Print "PRESS KEY": Pause 0 b = Peek 23672 Print "FRAMES LSB IS "; b Randomize b let a = Int (Rnd * 10) Print a

The result is always 0, no matter which value is in b. This shouldn't be!

I'm using 1.2.9-s888

Print this item