Jump to content

sintasis


castaño

Recommended Posts

hola quisiera que me ayudaran a achar un vistaso a este función:

function showProgress(objectiveId, bool, progress, total, stayText)

if progressBar == nil then

progressBar = {}

end

if progressBarText == nil then

progressBarText = {}

end

if progressBar[objectiveId] == nil and bool == true then

local x, y = guiGetScreenSize()

x = x / 2 - 100

y = y * 0.6

progressBar[objectiveId] = guiCreateProgressBar(x, y, 200, 20, false)

progressBarText[objectiveId] = guiCreateLabel(x, y - 30, 100, 25, stayText, false)

guiSetSize(progressBarText[objectiveId], guiLabelGetTextExtent(progressBarText[objectiveId]), guiLabelGetFontHeight(progressBarText[objectiveId]), false)

guiLabelSetColor(progressBarText[objectiveId], 255, 255, 255, 255)

end

if progressBar[objectiveId] == nil then

return

end

guiSetVisible(progressBar[objectiveId], bool)

guiSetVisible(progressBarText[objectiveId], bool)

if progress ~= nil and total ~= nil then

local p = math.ceil(progress / total * 100)

guiProgressBarSetProgress(progressBar[objectiveId], p)

guiSetText(progressBarText[objectiveId], "%s %d%%":format(stayText, p))

guiSetSize(progressBarText[objectiveId], guiLabelGetTextExtent(progressBarText[objectiveId]), guiLabelGetFontHeight(progressBarText[objectiveId]), false)

end

end

el problema es que me sale un error en la sintasis pero no lo he poidido encontrar

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...