1. Error Message not really useful ...

Hallo

The following piece of code gave me a hard time

global constant CBEM_DELETEITEM         =  CB_DELETESTRING 
global constant CB_DELETESTRING         = #0144 

it's just a piece of a bigger includefile for the win32api

it produces the following error

Fatal run-time error: 
first argument of match_from() must be a sequence 
 
 
 
Press Enter... 

That's with Eu4.0.4 and yes, it's not really helpfull...

Maybe there is a way to get a better error description.

Thank you Andreas

new topic     » topic index » view message » categorize

2. Re: Error Message not really useful ...

andi49 said...

... it produces the following error

Fatal run-time error: 
first argument of match_from() must be a sequence 

Yes, the message is unhelpful. That's because there's a bug.

If we agree that it shouldn't be forward referencing here then its displaying the wrong message. It should be saying something more like ...

<0074>:: Errors resolving the following references: 
    'CB_DELETESTRING' ( ... ) has not been declared. 

However, if it should be forward referencing here, then there should be no message.

I'm thinking that forward referencing here should be permitted because if we replace the offending lines with this, everything works ...

global constant CBEM_DELETEITEM         =  cb_delete_code()  
global constant CB_DELETESTRING         =  cb_delete_code() 
function cb_delete_code() 
    return #0144 
end function 
new topic     » goto parent     » topic index » view message » categorize

3. Re: Error Message not really useful ...

DerekParnell said...

I'm thinking that forward referencing here should be permitted because if we replace the offending lines with this, everything works ...

global constant CBEM_DELETEITEM         =  cb_delete_code()  
global constant CB_DELETESTRING         =  cb_delete_code() 
function cb_delete_code() 
    return #0144 
end function 

This one make me really nervous

global constant CBEM_DELETEITEM         =  CB_DELETESTRING 
global constant CB_DELETESTRING         = #0144 
 
printf(1,sprintf("%x", CBEM_DELETEITEM)&"\n") 
printf(1,sprintf("%x",CB_DELETESTRING) &"\n") 

results in this output (no error) with

C:\euDesigner\tindemo>c:\euDesigner\eu4\bin\eui.exe crashtest.exw 
0 
144 

Using this interpreter

C:\euDesigner\tindemo>c:\euDesigner\eu4\bin\eui.exe 
Euphoria Interpreter v4.1.0 development 
   32-bit Windows, Using Managed Memory 
   Revision Date: 2012-05-30 14:45:44, Id: 5568:aa6d6b7d74a3 
 
ERROR: Must specify the file to be interpreted on the command line 

Also i had the same Interpreter dying with Signal 5 using the complete include file. But i can't reproduce it with only a few lines.

Andreas

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu