R3 icon indicating copy to clipboard operation
R3 copied to clipboard

Json Error - ACE Missile 'AGM-114L Hellfire "Longbow"' Will cause Json Parse Error.

Open KOEI5113 opened this issue 4 years ago • 1 comments

image

This situation happen when anyone fire a missile named AGM-114L Hellfire "Longbow". Because this missile's name contain double quote marks, so when R3-Web try to parse this missile's Json data, will encounter Javascript Error due to syntax error.

This Javascript error will cause R3-Web playback got paused when this missile fired every time.

Not a big issue, I try to deal this error, by after get weapone's name then replace any double quote marks with the double quote mark with a escape sign (replace " by \"). But I don't think SQF have any function or method for this thing, like str_replace in PHP language.

I do saw some "string replace" function written by Arma 3 script community. But I not sure how to Integration it into R3.

Hope some one can push a hotfix.

(by the way i do amazed by no anyone's issue mention this problem.)

English is not my language and this issue is write by google translate mostly, so if anyone need more infomation, I'm happy to help.

KOEI5113 avatar Nov 06 '20 10:11 KOEI5113

see addons\main\functions\fnc_eventIncomingMissile.sqf : image

this part have chance to get a string which contain double quote marks.

KOEI5113 avatar Nov 06 '20 10:11 KOEI5113