Error message: No such operator defined

Home Forums General Programming Error message: No such operator defined

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #71233
    SWB
    Participant
    • Topics: 35
    • Replies: 157
    • Total: 192
    • ★★

    I did apply literally this code (from the SixTrak panel made by Possemo):

    lsb = PatchData:getByte(4)
    msb = PatchData:getByte(5);  byte = (lsb)+(msb*16); byteI=BigInteger(byte);

    and then I get the error message as mentioned in the subject when execution reaches the BigInteger part. (See also attached png)

    What does cause this error message? I’m on CTRLR 5.3.122 for MacOS

    (Sorry for the first irrelevant picture, my fault. Don’t know how to delete attachment after sending.)

    • This topic was modified 5 years, 3 months ago by SWB.
    • This topic was modified 5 years, 3 months ago by SWB.
    • This topic was modified 5 years, 3 months ago by SWB.
    • This topic was modified 5 years, 3 months ago by SWB.
    Attachments:
    You must be logged in to view attached files.
    #71252
    Possemo
    Participant
    • Topics: 14
    • Replies: 638
    • Total: 652
    • ★★★

    I guess PatchData is not defined. On my panel the Midimessage-Received-Method includes this: PatchData=midiMessage:getData()

    #71263
    SWB
    Participant
    • Topics: 35
    • Replies: 157
    • Total: 192
    • ★★

    Thanks Possemo for the reply. I do receive bytes in the method, because the console shows their value. With the code example below I get the error. When I comment out the line with BigInteger I don’t get the error message. So I think in one way or another BigInteger is not defined… This is the code I use, which is almost the same as yours (sorry for the layout):

    local t1
    	local t2
    	local t3
    	local byte
    	
    	sizeMidi = midi:getData():getSize()
    	msgtype= midi:getType()
    	if sizeMidi > 2500 then
    		for i = 1,8 do
    			t1 = midi:getData():getByte(i);
    			t2 = midi:getData():getByte(i+1)
    			console("t1=: "..t1)
    			console("t2=: "..t2)
    			byte = (t1)+(t2*16)
    			console("byte=: "..byte)
    			t3=BigInteger(byte)
    			console("value: "..t3)
    		end
    	end
    

    This is not the code I actually need, but without BigInteger I’m afraid (or pretty sure) getBitRangeAsInt won’t work either and I need that to work to be able to operate on bit level. Any input much appreciated.

    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    • This reply was modified 5 years, 3 months ago by SWB.
    #71280
    Possemo
    Participant
    • Topics: 14
    • Replies: 638
    • Total: 652
    • ★★★

    This may be because you are using an old Ctrlr build. Try with the newest build. Or, instead of BigInteger() you could try the deprecated CtrlrLuaBigInterger()

    #71302
    SWB
    Participant
    • Topics: 35
    • Replies: 157
    • Total: 192
    • ★★

    First I did download the latest Windows version, but it appeared that the panel I had made on the Mac would not send or receive MIDI in the Windows version. So I had to copy all the code manually. (I also had to adjust all the buttons and the labels, because font (and the screen resolution??) differ from the Mac.) This finally worked, but when I did add the “problematic” code, Ctrlr crashed and I could no load any panel anymore, all my work was lost! So I went back to Mac and tried your suggestion of using CtrlLuaBigInteger, but the same error message. So I downloaded the latest Mac version (I don’t use that one because it won’t load resources like images), but the same as on Windows, the panel would not send or receive MIDI. So I probably have to copy again manually all the code. For now I have had enough, maybe tomorrow I feel more up to the task again 😉 Thanks for the reply and advice!

    #71336
    SWB
    Participant
    • Topics: 35
    • Replies: 157
    • Total: 192
    • ★★

    Today I did use the latest Mac build 5.3.198, but same result, error message: no such operator defined. Also when I load a panel made in a previous version, midi in and out don’t work. Only when I make a panel from scratch does de MIDI I/O work. I wish atom would shed some light on all this…

    • This reply was modified 5 years, 3 months ago by SWB.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 62 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr