Bitten yet again!
vining
Posts: 4,368
Well I got bit by the same old compiler error once again.
on these two new blocks:
The worst part about this isn't the wasting of my time but breaking my train of thought, as I get older I'm finding it harder to get back into the groove and remember WTF I was trying to do before getting side lined.
ERROR: ................Mod.axs(9951): C10201: Syntax error; Illegal or Invalid syntax in code
on these two new blocks:
ACTIVE(nBtn == SBS_BTN_TRKINFO_BACK)://281 { fnFB_DoSend_CHNL(UI_UPDATE_ACTIVE,nBtn,CH_PULSE); if(sTrkInfo.nLevel > 1) { STACK_VAR _sTrkInfoLVL sZeroLevel; STACK_VAR _sTrkInfoLVL sZeroList[MAX_TRK_INFO_LINES]; sTrkInfoLVL[sTrkInfo.nLevel] = sZeroLevel; sTrkInfoList[sTrkInfo.nLevel] = sZeroList; sTrkInfo.nLevel--; fnFB_Update_TrkInfoList(UI_UPDATE_ACTIVE,NOFORCE,NOCLEAR); } } ACTIVE(nBtn == SBS_BTN_TRKINFO_EXIT)://291 { STACK_VAR INTEGER i; STACK_VAR _sTrkInfoLVL sZeroLevel; STACK_VAR _sTrkInfoLVL sZeroList[MAX_TRK_INFO_LINES]; fnFB_DoSend_CHNL(UI_UPDATE_ACTIVE,nBtn,CH_PULSE); for(i = sTrkInfo.nLevel; i; i--) { sTrkInfoLVL[i] = sZeroLevel; sTrkInfoList[i] = sZeroList; } fnFB_DoSend_UI_CMD(UI_UPDATE_ACTIVE,'PPOF-SBS_TrkInfoList'); fnFB_Update_TrkInfoList(UI_UPDATE_ACTIVE,NOFORCE,CLEAR); }The error was in the 1st Active at this line:
sTrkInfoLVL[sTrkInfo.nLevel] = sZeroLevel;And once again I spent 10 minutes scratching my head trying to figure out WTF was wrong until it dawned on me yet again that it was that stupid compiler error where the compiler doesn't approve of setting arrays or structures on the 1st line after declarations and once again I had to add a freakin' line of code for no other reason but to appease the compiler like so:
ACTIVE(nBtn == SBS_BTN_TRKINFO_BACK)://281 { fnFB_DoSend_CHNL(UI_UPDATE_ACTIVE,nBtn,CH_PULSE); if(sTrkInfo.nLevel > 1) { STACK_VAR INTEGER i; STACK_VAR _sTrkInfoLVL sZeroLevel; STACK_VAR _sTrkInfoLVL sZeroList[MAX_TRK_INFO_LINES]; i++; sTrkInfoLVL[sTrkInfo.nLevel] = sZeroLevel; sTrkInfoList[sTrkInfo.nLevel] = sZeroList; sTrkInfo.nLevel--; fnFB_Update_TrkInfoList(UI_UPDATE_ACTIVE,NOFORCE,NOCLEAR); } }You would think this to be an easy fix at AMX but year after year I keep getting bitten by this stupid $hit. On the bright side I am catching it quicker than I did early on but it would be nice if someone would address some of these looooooooong standing issues.
The worst part about this isn't the wasting of my time but breaking my train of thought, as I get older I'm finding it harder to get back into the groove and remember WTF I was trying to do before getting side lined.
0
Comments
Paul