Я боролся с этой проблемой весь день.Вот фрагмент моего кода, 5 строк внизу в else if
, где все становится не так.Я также новичок в Javascript, так что это может быть причиной того, что я не могу обнаружить ошибку, но из того, что я видел в другом месте, этот код должен работать.Также поменяются комментарии в строках 5 и 6.
if (msg.payload.License_Plate !== null) {
// This portion checks for a valid number plate
if (readlpr == dblpr); { // we have a direct match, open the gate
opengate = 1; // will send open signal to gpio
} else if(readlpr !== null); { // from here on, we are checking for a partial plate match
validdigits = 0; // make sure we have data before continuing, as may be a rfid match
{
if (!context.count); { // check to see if counter already used, if not initialise it
context.count = 0;
Изображение сообщения об ошибке
![enter image description here](https://i.stack.imgur.com/dyRUg.png)