Enum causing pawncc crash?
#1

When I compile with the following enumerator, which happens to be extremely important to my script, the compiler crashes with the old "Pawn Compiler library has encountered a problem and needs to close. We are sorry for the inconvenience." message.
pawn Код:
enum CellDataEnum
{
    in,            
    up,        
    left,  
    prevx, prevy
};
But, when I compile it without or with the enum modified, it continues compilation. For example, all of these let the compiler continue!
pawn Код:
enum CellData //CellData is already defined, so this causes errors, but no crash.
{
    in,            
    up,        
    left,  
    prevx, prevy
};

enum Ceaefefe //Allows continuing (with errors of course)
{
    in,            
    up,        
    left,  
    prevx, prevy
};

enum //Allows continuing (with errors of course)
{
    in,            
    up,        
    left,  
    prevx, prevy
};

EDIT: I've just tested commenting the array that uses this enum and keeping the enum right, the compiler continues. But either way this needs fixed for any efficiency.
Reply
#2

The only reason a compiler would crash is if you're not coding it properly. There's no need to fix anything, just code correctly.

The enum itself compiles perfectly fine, where are you using it in your script?
Reply
#3

I don't crash while using it, it seems to work fine.
Reply
#4

Quote:
Originally Posted by Threshold
Посмотреть сообщение
The only reason a compiler would crash is if you're not coding it properly. There's no need to fix anything, just code correctly.

The enum itself compiles perfectly fine, where are you using it in your script?
Threshhold can I send you the script? I don't know how to explain what's going on. I'm pretty confused. I'm sure it's probably something right in front of my eyes too, something super simple that even a newb script would notice. I hate when those little things happen.. :/
Reply
#5

Use:
pawn Код:
#define xsize   11      //Width of the maze.
#define ysize   11      //Height of the maze.
rather than:
pawn Код:
new xsize=11;           //Width of the maze.
new ysize=11;           //Height of the maze.
Reply
#6

See, holy mother fucking shit... I feel so fucking retarded...

All my years of scripting and this is what it has come to.

Thx Thresh :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)