madExcept config Load/saving bug
Posted: Tue Aug 21, 2018 7:25 am
First of all, there is an character conflict problem, I have that you using a character of #$b4 that point out of no value while using GetPrivateProfileStringA, but in Asia Character it was recognized as a Chinese Character with the bytes follow, so IDE displayed as an unterminated statement and don’t let compiling.
The solution is using #$b4 instead of using quoted characters, and It will be fine
here is my changes:
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, arrCh, MAX_PATH, PAnsiChar(fileName)) <> 1) or
(arrCh[0] <> #$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, arrCh, MAX_PATH, PAnsiChar(fileName)) <> 1) or
(arrCh[0] <> #$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, pc, 32 * 1024, PAnsiChar(fileName)) <> 1) or
(pc[0] <> #$b4) then begin
if (GetPrivateProfileStringA('AppendMapFile', 'Enabled', #$b4, pointer(@arrCh), MAX_PATH, PAnsiChar(fn)) <> 1) or
(PAnsiChar(@arrCh)^ <>#$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, pc, 32 * 1024, PAnsiChar(fileName)) <> 1) or
(pc[0] <> #$b4) then
The solution is using #$b4 instead of using quoted characters, and It will be fine
here is my changes:
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, arrCh, MAX_PATH, PAnsiChar(fileName)) <> 1) or
(arrCh[0] <> #$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, arrCh, MAX_PATH, PAnsiChar(fileName)) <> 1) or
(arrCh[0] <> #$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, pc, 32 * 1024, PAnsiChar(fileName)) <> 1) or
(pc[0] <> #$b4) then begin
if (GetPrivateProfileStringA('AppendMapFile', 'Enabled', #$b4, pointer(@arrCh), MAX_PATH, PAnsiChar(fn)) <> 1) or
(PAnsiChar(@arrCh)^ <>#$b4) then begin
if (GetPrivateProfileStringA(PAnsiChar(section), PAnsiChar(key), #$b4, pc, 32 * 1024, PAnsiChar(fileName)) <> 1) or
(pc[0] <> #$b4) then