error in function, help!

Runbu73

Участник
Автор темы
123
4
этот знак подтверждает признак, что не правильно копируешь в переводчике.

Первое, посмотрите на регистр в название функции.
Допустим. GetPlayer != getPlayer. Одна буква и все равно будет ошибка.
Is the translator causing problems?

Ícone Verificada pela comunidade


get full code in hide bb-code
there's only one Russian player speaking

Ícone Verificada pela comunidade
 

Vintik

Через тернии к звёздам
Проверенный
1,526
1,010
if you want to share your code, please use special block for it:
Без имени.png
Снимок экрана 2024-02-13 174301.png
Lua:
function main()
    -- example of code
end

According to your problem:
function GetBodyPartCoordinates does not exist, use getBodyPartCoordinates (first letter "g" should be small)
if vxfullped.v then
local whpos = {GetBodyPartCoordinates(8, handlePed)}
local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
local _, id = sampGetPlayerIdByCharHandle(handlePed)
local nick = sampGetPlayerNickname(id)
renderFontDrawText(font, nick.." | ID ["..id.."]" , x2, y2 - 50, color, -1)
end
Lua:
if vxfullped.v then
    local whpos = { getBodyPartCoordinates(8, handlePed) }
    local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
    local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
    local _, id = sampGetPlayerIdByCharHandle(handlePed)
    local nick = sampGetPlayerNickname(id)
    renderFontDrawText(font, nick .. " | ID [" .. id .. "]", x2, y2 - 50, color, -1)
end
GL, if you have any other problems - feel free to ask us.

upd. Make sure that you use last version of moonloader
 
Последнее редактирование:

Runbu73

Участник
Автор темы
123
4
se você quiser compartilhar seu código, use um bloco especial para ele:
[SPOILERS] Посмотреть вложение 232576Посмотреть вложение 232577[/SPOILERS]
[CÓDIGO=lua]função principal()
-- exemplo de código
fim[/CODE]

De acordo com o seu problema:
a função G etBodyPartCoordens não existe, use g etBodyPartCoordens (a primeira letra "g" deve ser pequena)

Lua:
se vxfullped.v então
    local whpos = {getBodyPartCoordenadas(8, handlePed) }
    local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
    local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
    local _, id = sampGetPlayerIdByCharHandle(handlePed)
    apelido local = sampGetPlayerNickname(id)
    renderFontDrawText(fonte, nick .. " | ID [" .. id .. "]", x2, y2 - 50, cor, -1)
fim
GL, se você tiver qualquer outro problema, sinta-se à vontade para nos perguntar.

atualizado. Certifique-se de usar a última versão do moonloader
se você quiser compartilhar seu código, use um bloco especial para ele:
[SPOILERS] Посмотреть вложение 232576Посмотреть вложение 232577[/SPOILERS]
[CÓDIGO=lua]função principal()
-- exemplo de código
fim[/CODE]

De acordo com o seu problema:
a função G etBodyPartCoordens não existe, use g etBodyPartCoordens (a primeira letra "g" deve ser pequena)

Lua:
se vxfullped.v então
    local whpos = {getBodyPartCoordenadas(8, handlePed) }
    local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
    local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
    local _, id = sampGetPlayerIdByCharHandle(handlePed)
    apelido local = sampGetPlayerNickname(id)
    renderFontDrawText(fonte, nick .. " | ID [" .. id .. "]", x2, y2 - 50, cor, -1)
fim
GL, se você tiver qualquer outro problema, sinta-se à vontade para nos perguntar.

atualizado. Certifique-se de usar a última versão do moonloader

if you want to share your code, please use special block for it:
Lua:
function main()
    -- example of code
end

According to your problem:
function GetBodyPartCoordinates does not exist, use getBodyPartCoordinates (first letter "g" should be small)

Lua:
if vxfullped.v then
    local whpos = { getBodyPartCoordinates(8, handlePed) }
    local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
    local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
    local _, id = sampGetPlayerIdByCharHandle(handlePed)
    local nick = sampGetPlayerNickname(id)
    renderFontDrawText(font, nick .. " | ID [" .. id .. "]", x2, y2 - 50, color, -1)
end
GL, if you have any other problems - feel free to ask us.

upd. Make sure that you use last version of moonloader
got this error when activating...

Ícone Verificada pela comunidade

[ML] (error) Scarllet Rage: cannot resume non-suspended coroutine
stack traceback:
[C]: in function 'getBonePosition'
...\comed\Downloads\GTA SA\moonloader\Scarllet Rage (8).lua:2331: in function 'getBodyPartCoordinates'
...\comed\Downloads\GTA SA\moonloader\Scarllet Rage (8).lua:926: in function 'whiledo'
...\comed\Downloads\GTA SA\moonloader\Scarllet Rage (8).lua:403: in function <...\comed\Downloads\GTA SA\moonloader\Scarllet Rage (8).lua:245>
[ML] (error) Scarllet Rage: Script died due to an error. (26AE2EC4)
 

Вложения

  • 1708453154190.png
    1708453154190.png
    312 байт · Просмотры: 4