iFoReX Posted April 28, 2012 Share Posted April 28, 2012 como dice en el titulo mi setTimer no funciona en el debugging me dice bad argument (got boolean) y tambn bad argument(got nil) aqui el .lua GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Progress = {} GUIEditor_Window[1] = guiCreateWindow(0.3425,0.45,0.3562,0.325,"",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Edit[1] = guiCreateEdit(78,39,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[1],true) GUIEditor_Edit[2] = guiCreateEdit(78,77,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[2],true) GUIEditor_Edit[3] = guiCreateEdit(78,115,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[3],true) GUIEditor_Label[1] = guiCreateLabel(47,38,28,28,"PosX",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(47,80,28,28,"PosY",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(47,121,28,28,"PosZ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(9,157,102,29,"ObtenerPosicion",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(219,158,57,26,"Limpiar",false,GUIEditor_Window[1]) GUIEditor_Progress[1] = guiCreateProgressBar(0.4375,0.3967,0.1912,0.055,true) guiProgressBarSetProgress(GUIEditor_Progress[1], 0) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Button[2],false) guiSetVisible(GUIEditor_Progress[1],false) showCursor(false) bindKey("F6","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) guiSetVisible(GUIEditor_Progress[1], not guiGetVisible(GUIEditor_Progress[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[2] ) then guiSetText ( GUIEditor_Edit[1], " " ) guiSetText ( GUIEditor_Edit[2], " " ) guiSetText ( GUIEditor_Edit[3], " " ) guiSetVisible ( GUIEditor_Button[2], false ) elseif ( source == GUIEditor_Button[1] ) then local x, y, z = getElementPosition ( localPlayer ) getProgress = guiProgressBarGetProgress(GUIEditor_Progress[1]) guiSetVisible(GUIEditor_Progress[1],true) guiProgressBarSetProgress(GUIEditor_Progress[1], getProgress + 20) guiSetText ( GUIEditor_Edit[1], x ) guiSetText ( GUIEditor_Edit[2], y ) guiSetText ( GUIEditor_Edit[3], z ) guiSetVisible ( GUIEditor_Button[2], true ) triggerServerEvent ( "onSavePos", localPlayer, x, y, z ) if getProgress == 100 then guiSetVisible(GUIEditor_Button[1],false) setTimer( (guiSetVisible(GUIEditor_Button[1],true)), 240000, 1 ) outputChatBox("Tendras que esperar 4 minutos para poder ver tus Posiciones denuevo", localPlayer, 255, 255, 0, true) end end end ) gracias de antemano Link to comment
Edikosh998 Posted April 28, 2012 Share Posted April 28, 2012 setTimer( guiSetVisible, 240000, 1,GUIEditor_Button[1],true ) Link to comment
iFoReX Posted April 28, 2012 Author Share Posted April 28, 2012 setTimer( guiProgressBarSetProgress, 240000, 1,GUIEditor_Progress[1],0) ahora no me funciona esto Link to comment
Alexs Posted April 28, 2012 Share Posted April 28, 2012 setTimer( guiProgressBarSetProgress, 240000, 1,GUIEditor_Progress[1],0) ahora no me funciona esto setTimer( guiProgressBarSetProgress, 240000, 1,GUIEditor_Progress[1], true) Link to comment
Castillo Posted April 28, 2012 Share Posted April 28, 2012 @Alexs_Steel: Vos siquiera lees los argumentos requeridos? Required ArgumentstheProgressbar: The progressbar you want to change the progress of progress: a float ranging from 0 - 100 Vos estas usando un boolean ( true ). Link to comment
iFoReX Posted April 28, 2012 Author Share Posted April 28, 2012 Es verdad me funciono con el 0 igual gracias a todos los que me ayudaron Link to comment
Recommended Posts