При запуске скрипта: "than" expected near "="
Все работало без добавления строчек на проверку открыт ли гараж, если да, то пишет сообщение "Ворота уже открыты.".
Возможно, что-то делаю не так, новичек в этом. Поправьте и дайте толковое объяснение, спасибо.
function createTheGate ( )
Gate1 = createObject ( 8948, 2790, 2618.69995, 11.6, 0, 0, 90 )
end
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ),
createTheGate )
function closeMyGate1 (toggle1)
if toggle1 == true then
moveObject ( Gate1, 3000, 2797.2, 2618.69995, 11.6, 0, 0, 0 )
OpenGarage = true
end
if toggle1 == false then
moveObject ( Gate1, 3000, 2790, 2618.69995, 11.6, 0, 0, 0 )
OpenGarage = false
end
end
function openMyGate1 ( source )
local jugador = getPlayerMoney( source )
if OpenGarage = false then
getPlayerMoney( source ) >= 500 then
takePlayerMoney( source, 500 )
outputChatBox("Вы использовали автогараж. Со счета снято 500$.", source)
moveObject ( Gate1, 3000, 2797.2, 2618.69995, 11.6, 0, 0, 0 )
OpenGarage = true
else
if getPlayerMoney( source ) < 500 then
outputChatBox("Не хватает денег...", source)
end
end
if OpenGarage = true then
outputChatBox("Ворота уже открыты.", source)
end
end
addCommandHandler("og", openMyGate1)
function openMyGate1 ( source )
local jugador1 = getPlayerName( source )
if closeMyGate1 == false then
moveObject ( Gate1, 3000, 2790, 2618.69995, 11.6, 0, 0, 0 )
closeMyGate1 = true
end
end
addCommandHandler("cg", openMyGate1)