Recent posts

#1
OxygenBasic Examples / Re: Console troubles
Last post by Zlatko Vid - June 19, 2025, 08:13:50 AM
Hi Charles

Aha i see then ok  ;)
#2
OxygenBasic Examples / Re: Console troubles
Last post by Charles Pegge - June 16, 2025, 12:35:33 PM
Hi Aurel.

O2's input is unprocessed, so it captures the crlf. rtrim removes all trailing white-space.

uses console
string ans
DO
ans = rtrim INPUT
if lcase(ans) = "y" : goto ExitDo : end if
print ans
END DO

ExitDo:
waitkey
CLS
#3
Meta Forum / Why so many invisible users?
Last post by Theo Gottwald - June 15, 2025, 08:58:26 PM
My provider tells me sometimes that we use so much datatransfer that the forum is sometimes blanking out.
If i look down there it says "Max. users today 70". I wonder what this could be.
The only answer i may have is that AI-Bots search our forum in large numbers to find code for people.
If anybody has a better idea, please tell me.

PS: Currently i do not plan to buy a higher bandwith rate from my provider for these bots to suck faster.
The have to be happy with what we have.
#4
OxygenBasic Examples / Re: Console troubles
Last post by Zlatko Vid - June 15, 2025, 08:01:02 PM
does really need to be trimmed?

ans = ltrim rtrim(input())

?
#5
OxygenBasic Examples / Console troubles
Last post by Zlatko Vid - June 15, 2025, 07:54:09 PM
Hi to all..
I must say that i hate console but
i am kind a forced to use it for QB translation to o2 code
so why goto ExitDo or just Exit Do not jump from DO/END DO loop ?
or what i am doing wrong  :o

DO
ans = INPUT
if lcase(ans) = "y" : goto ExitDo : end if
print ans
END DO

ExitDo:
waitkey
CLS

 
#6
OxygenBasic Examples / Re: get o2 version
Last post by Zlatko Vid - June 12, 2025, 07:54:48 AM
OK then this is similar problem i have with BIND with
SendMessage() function in my awinh.inc file
all fine   :D
#7
OxygenBasic Examples / Re: get o2 version
Last post by Pierre Bellisle - June 12, 2025, 05:42:35 AM
I found it!
Problem is a conflict between bind and UnmapViewOfFile(pBuf)
if I replace Bind by CopyMemory then UnmapViewOfFile(pBuf) does not gpf anymore.
Bind might prevent UnmapViewOfFile(pBuf) to access memory for desalloating.
 
'in server code
declare sub CopyMemory lib "kernel32" alias "RtlMoveMemory" _
(byval Destination as sys, byval Source as sys, byval Length as long)
...
'bind pBuf
  sys p
  int i1, i2
  float f1, f2
  char c1[0x100]
'end bind

i1 = 123
i2 = 456
f1 = pi()
c1 = szMsg

sys pBuf2
CopyMemory pBuf,  @p, sizeof(sys)    : pBuf2 = pBuf + sizeof(sys)
CopyMemory pBuf2, @i1, sizeof(int)   : pBuf2 += sizeof(sys) '123
CopyMemory pBuf2, @i2, sizeof(int)   : pBuf2 += sizeof(sys) '456
CopyMemory pBuf2, @f1, sizeof(float) : pBuf2 += sizeof(sys)
CopyMemory pBuf2, @f2, sizeof(float) : pBuf2 += sizeof(sys)
CopyMemory pBuf2, @c1, len(szMsg)
'
#8
OxygenBasic Examples / Re: get o2 version
Last post by Pierre Bellisle - June 12, 2025, 04:32:34 AM
Hi Aurel,
Good to ear from you,

Seems you got the same file  I used, aka server part from post #3.
I got no problem to compile the file as is from Oxide.
Under Windows 7/64, I tried eight O2 version, same gpf on all of them.
This include 6.04, so you might have the same gpf since you use this version.

All you have to do to test is compile the  server part from post #3,
run it, then when you click the OK button a gpf error message from Windows appear.
It won't appear if I rem the line UnmapViewOfFile(pBuf)

This is the details provided in the gpf message box.

Signature du problème :
  Nom d'événement de problème: BEX64
  Nom de l'application: NamedSharedMemoryA01.exe
  Version de l'application: 0.0.0.0
  Horodatage de l'application: 684a3a2c
  Nom du module par défaut: StackHash_5d53
  Version du module par défaut: 0.0.0.0
  Horodateur du module par défaut: 00000000
  Décalage de l'exception: 0000010000000001
  Code de l'exception: c0000005
  Données d'exception: 0000000000000008
  Version du système: 6.1.7601.2.1.0.256.48
  Identificateur de paramètres régionaux: 3084
  Information supplémentaire n° 1: 5d53
  Information supplémentaire n° 2: 5d53daca3c00ebb4a7319390a6b37de1
  Information supplémentaire n° 3: c8b0
  Information supplémentaire n° 4: c8b099d242f1a67858aa0c71c55b8faf

Note that UnmapViewOfFile(pBuf) works fine in the client part.
#9
OxygenBasic Examples / Re: get o2 version
Last post by Zlatko Vid - June 08, 2025, 08:16:16 AM
Hi Pierre
I am not sure what this examples exactly do
i simply don't make such types of programs
but interesting my code editor written in OxygenBasic
cannot found compiler path ..look in image..
#10
OxygenBasic Examples / Re: get o2 version
Last post by Zlatko Vid - June 08, 2025, 08:07:11 AM
I have Win7_64bit on Dual core with 2GB ram
(blame me i am lazy to build win10/11 PC..i have parts)
so what exactly i must test?
this program or download latest release?
(again i use older o2_sc604)  ;D