Author Topic: Not sure what this error means...  (Read 1054 times)

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

  • Guest
Not sure what this error means...
« on: December 28, 2018, 02:01:33 AM »
 I am getting this error, but i do not understand it. It doesnt like a 45 that i dont see anywhere.  ?

 What could this error mean?


Note:
This is pseudo code that does nothing, and is purely for syntax testing, so, im not looking for alternatives. :)
I am also aware of the error in the parameter variable of PEEKS.

Charles Pegge

  • Guest
Re: Not sure what this error means...
« Reply #1 on: December 28, 2018, 07:46:03 AM »
Hi Brian,

It means o2 is trying to dim a variable, but the type-name given (45) cannot be identified. So something in your code is generating a funny type-name.

Brian Alvarez

  • Guest
Re: Not sure what this error means...
« Reply #2 on: December 28, 2018, 02:25:05 PM »
There is no 45 in my code... maybe something internal? I am guessing it is trying to create a temp variable for processing a statement, but is using an invalid character name for the variable name. Take a look at this smaller example that complains about a 16 (notice the non-printable character before the 16):

Code: [Select]
'Generated with PluriBASIC 6.0.123201.0

$ filename "C:\Users\Diamante\Documents\PluriBASIC\projects\pluridll\MACRO_ERROR.exe"

uses rtl64

Declare Function PluriBASICMessageBox  Lib "user32.dll" Alias "MessageBoxA"

' STARTS PLURIBASIC_PREPARE.BIN
' This code is executed before anything else, if you want to do something after defining other things, see PLURIBASIC_INIT


' END OF PLURIBASIC_PREPARE.BIN
' STARTS STR$.BIN
' STARTS LTRIM$.BIN
// returns a trimed string
FUNCTION LTRIM(string src, long a = 0, string ch = " ") as string

    if len(src) = 0 then return ""
    if len(ch) = 0 then return ""
   
    byte srcchar at strptr(src)
    byte trichar at strptr(ch)
    long p1 = 1
    long index   
    long cha   
       
    if a then
        for index = 1 to len(src)       
            for cha = 1 to len(ch)       
                if srcchar[index] = trichar[cha] then
                    goto checknextchar                     
                end if
            next
            p1 = index
            exit for
            checknextchar:
        next
        return mid(src, p1)
    else       
        for index = 1 to len(src)
            for cha = 1 to len(ch)       
                if srcchar[index+cha-1] <> trichar[cha] then
                    goto nomorematches
                end if               
            next
            p1 += len(ch)             
        next
        nomorematches:       
        return mid(src, p1)
    end if
   
END FUNCTION
' END OF LTRIM$.BIN
' CONTINUES (1) STR$.BIN
' Enter the stock code and functions here.
FUNCTION _STR(double v, long d = 8) as string
    long d2 = d-1
    if v < 0 then
        return str(v, d2)
    else
        string ss = str(v, d2)
        if instr(ss, ".") then
            return " " & LTRIM(ss, 0, "0")
        else
            return " " & ltrim(ss)
        end if
    end if
END FUNCTION


' END OF STR$.BIN
' STARTS PLURIBASIC_INIT.BIN
' This code is executed before anything else, if you want to do something before nything else, see PLURIBASIC_PREPARE
       
   
   
   

' END OF PLURIBASIC_INIT.BIN
' STARTS MSGBOX.BIN
FUNCTION MSGBOX(string sText, sys mOptions = 0, string sCaption = "PluriBASIC") AS LONG
   FUNCTION = PluriBASICMessageBox(0, sText, sCaption, mOptions)
END FUNCTION
' END OF MSGBOX.BIN
' STARTS CALLBACKDATA.BIN
' END OF CALLBACKDATA.BIN

' SYSTEM DECLARES FOR ARRAYS


DECLARE FUNCTION REF(P1 AS STRING, P2 AS STRING, P3 AS INT, P4 AS STRING, P5 AS INT, P6 AS INT, P7 AS STRING) AS LONG
DECLARE FUNCTION PBMAIN() AS LONG


' Initializes various things in the script.
FUNCTION PluriBASIC_Initialize() AS LONG

END FUNCTION

FUNCTION REF(STRING *f, STRING *sd, INT *e, STRING *o, INT *i, INT *m, STRING *l) AS INT
   INT _05FUNCTION = 0
   MSGBOX (f)
   RETURN _05FUNCTION
END FUNCTION

FUNCTION PBMAIN() AS INT
   INT _05FUNCTION = 0
   INT oindex
   REF(bycopy "PBMAIN", bycopy "", bycopy 148, bycopy _STR(oindex, byval 0) & "extra", oindex, byval 0, byval 0)
END FUNCTION

PBMAIN() ' invoke entry point

Brian Alvarez

  • Guest
Re: Not sure what this error means...
« Reply #3 on: December 28, 2018, 03:02:28 PM »
I bet that internally oxygen is trying to do something like:

Code: [Select]
?16 = _STR(oindex, byval 0)
During the part-by-part processing of the statement.