error 008: must be a constant expression; assumed zero
#1

pawn Код:
enum checkpointsdata
{
carcp,

}
new checkpoints[checkpointsdata];
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{

    switch(checkpointid)
    {
        case checkpoints[carcp]: // this line makes the error!
        {
           
            return 1;
        }
    }
    return 1;

}
How to fix this error?
Reply
#2

Try this:
pawn Код:
switch(checkpointid)
{
    case 0:
    {
        random(sizeof(checkpoints[carcp]));
        return 1;
    }
}
Edit: not tested.
Reply
#3

Not working. Any other idea's?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)