Ir para conteúdo
Fórum Script Brasil

Pesquisar na Comunidade

Mostrando resultados para as tags ''erro''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Programação & Desenvolvimento
    • ASP
    • PHP
    • .NET
    • Java
    • C, C++
    • Delphi, Kylix
    • Lógica de Programação
    • Mobile
    • Visual Basic
    • Outras Linguagens de Programação
  • WEB
    • HTML, XHTML, CSS
    • Ajax, JavaScript, XML, DOM
    • Editores
  • Arte & Design
    • Corel Draw
    • Fireworks
    • Flash & ActionScript
    • Photoshop
    • Outros Programas de Arte e Design
  • Sistemas Operacionais
    • Microsoft Windows
    • GNU/Linux
    • Outros Sistemas Operacionais
  • Softwares, Hardwares e Redes
    • Microsoft Office
    • Softwares Livres
    • Outros Softwares
    • Hardware
    • Redes
  • Banco de Dados
    • Access
    • MySQL
    • PostgreSQL
    • SQL Server
    • Demais Bancos
  • Segurança e Malwares
    • Segurança
    • Remoção De Malwares
  • Empregos
    • Vagas Efetivas
    • Vagas para Estágios
    • Oportunidades para Freelances
  • Negócios & Oportunidades
    • Classificados & Serviços
    • Eventos
  • Geral
    • Avaliações de Trabalhos
    • Links
    • Outros Assuntos
    • Entretenimento
  • Script Brasil
    • Novidades e Anúncios Script Brasil
    • Mercado Livre / Mercado Sócios
    • Sugestões e Críticas
    • Apresentações

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Boa noite galera, Resolvi tentar aprender como criar um site, e estou começando pelo básico do básico e logo de cara me dei com um problema. Fiz um layout horrendo no photoshop só para aprender a passar pro HTML/CSS, e na parte dos menus eu usei um retângulo com as pontas arredondadas, e para passar ele pro HTML salvei como PNG as ambas as pontas e o meio do menu. Eu até consegui fazer as imagens do menu aparecer no meu Index, mas sempre que tendo move-las usando comandos como background-position as imagens simplesmente somem do meu site. Espero que possam me ajudar. Desde já agradeço. Segue a print do meu código:
  2. Estou com um erro para abrir meu site em qualquer servidor local, nesse caso estou usando o xampp, mas já tentei usar o wampserver também. Esse é o erro: Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error: Unknown: Failed opening required 'C:/xampp/htdocs/teste/index.php' (include_path='.;c:\php\includes') in Unknown on line 0 Obrigado.
  3. Bom dia, estou com um problema, eu precisava instalar o postgresql 9.1 e o 9.5, ambos já instalei, e o 9.1 está 100 %, mas o segundo o 9.5 não cria usuario de jeito algum, e ainda da o seguinte erro: -bash-4.1$ psql psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? e não me deixas fazer mais nada, teria alguma outra forma de criar usuario ? pois pelo pgadmin ele consegue conectar no ip, e na porta, e da erro na autenticação do usúario.
  4. Estou tentando calcular o numero de dias que existe entre duas datas Ex: 01/01/2014 ate 31/12/2014 são 365 dias. Fiz uma pesquisa e vi que se eu o DATEDIFF, mais quando eu tento rodar a seguinte query dá o seguinte erro: SELECT DATEDIFF('31/12/2014', '01/01/2014') FROM DUAL ERRO: ORA-00904: "DATEDIFF": identificador inválido
  5. Olá colegas, Eu estou usando um script pronto e eu coloquei no meio um outro script, pois não sou bom em programação, estou aprendendo e não está funcionando, mas pelo meu pouco conhecimento eu não estou identificando onde está o erro. No meu host já fiz o teste sem adicionar o segundo script o primeiro funciona. Peço uma ajuda por favor! Segue o código: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php //PREENCHA OS DADOS DE CONEXÃO A SEGUIR: $host= 'meuservidor'; $bd= 'meubanco'; $senhabd= 'minhasenha'; $userbd = $bd; // RECEBENDO OS DADOS PREENCHIDOS DO FORMULÁRIO ! $nome = $_POST ["nome"]; //atribuição do campo "nome" vindo do formulário para variavel $email = $_POST ["email"]; //atribuição do campo "email" vindo do formulário para variavel $ddd = $_POST ["ddd"]; //atribuição do campo "ddd" vindo do formulário para variavel $tel = $_POST ["telefone"]; //atribuição do campo "telefone" vindo do formulário para variavel $endereco = $_POST ["endereco"]; //atribuição do campo "endereco" vindo do formulário para variavel $cidade = $_POST ["cidade"]; //atribuição do campo "cidade" vindo do formulário para variavel $estado = $_POST ["estado"]; //atribuição do campo "estado" vindo do formulário para variavel $bairro = $_POST ["bairro"]; //atribuição do campo "bairro" vindo do formulário para variavel $pais = $_POST ["pais"]; //atribuição do campo "pais" vindo do formulário para variavel $login = $_POST ["login"]; //atribuição do campo "login" vindo do formulário para variavel $senha = $_POST ["senha"]; //atribuição do campo "senha" vindo do formulário para variavel $news = $_POST ["news"]; //atribuição do campo "news" vindo do formulário para variavel $sexo = $_POST ["sexo"]; //atribuição do campo "sexo" vindo do formulário para variavel //Gravando no banco de dados ! //conectando com o localhost - mysql $conexao = mysql_connect($host,$bd, $senhabd); if (!$conexao) die ("Erro de conexão com o host, o seguinte erro ocorreu -> ".mysql_error()); //conectando com a tabela do banco de dados $banco = mysql_select_db($bd,$conexao); if (!$banco) die ("Erro de conexão com banco de dados, o seguinte erro ocorreu -> ".mysql_error()); $selsql = "SELECT * FROM clientes where (email = '$email')"; $teste = mysql_query($selsql,$conexao); if (mysql_num_rows($teste) > 0) { echo "Erro"; } else { $query = "INSERT INTO `clientes` ( `nome` , `email` , `sexo` , `ddd` , `telefone` , `endereço` , `cidade` , `estado` , `bairro` , `país` , `login` , `senha` , `news` , `id` ) VALUES ('$nome', '$email', '$sexo', '$ddd', '$tel', '$endereco', '$cidade', '$estado', '$bairro', '$pais', '$login', '$senha', '$news', '')"; mysql_query($query,$conexao); echo "OK"; } </body> </html> Nos echos tentei colocar um javascript com duas funções em páginas separadas loginsucssessfully e loginfailed com setimeout, daí pensei que era isso que estava dando erro e tirei e deixei os echos "Erro" e "OK", mesmo assin não funcionou. A função sleep() nem tentei, não sei usá-la ainda direito. As vezes dá página em branco e às vezes dá caracteres japoneses no lugar dos echos, mas em ambos os casos não registra na tabela do banco. Atenciosamente colegas, Phil
  6. Olá pessoal, Antes de mais nada gostaria de pedir perdão quanto à indentação do códígo que vou postar aqui. Estou aprendendo. Eu fiz um sistema de busca, na realidade eu aprendi com um tutorial, está dando tudo certo, exceto por uma coisa, existem 4 situações: 1- Não digito nada no campo de busca e clico no botão. Resultado: o sistema da a mensagem correta. 2- Digito uma palavra ou misturas de letras que eu sei que não estão no banco. Resultado: o sistema da a mensagem correta. 3- Eu digito 2 ou mais palavras que eu sei que estão no banco. Resultado: o sistema exibe o reultado corretamente. 4- Eu digito 1 palavra que eu sei que está no banco e 1 palavra que eu sei que não está no banco.Resultado: o sistema desconsidera a palavra que está no banco e dá a mensagem de "Nenhum resultado encontrado" ao invés de considerar a palavra que está no banco e exibir o resultado. A palavra que não existe está impedindo de o resultado para a palavra que existe aparecer. Eu preciso que o resultado apareça mesmo que o usuário digite 10 palavras ou mais e apenas uma constar no banco. Peço aos colegas que me ajudem a resolver esse problema por gentileza, valeu! Segue o código: <?php if(isset($_POST['botao'])){ $busca = $_POST['busca']; if($busca == "" or $busca == " "){ header('location:http://www.meudominio.com.br/digitealgoparaabusca.php'); }else{ $busca_dividida = explode(' ',$busca); $quant = count($busca_dividida); $id_mostrado = array(""); for($i=0;$i<$quant;$i++){ $pesquisa = $busca_dividida[$i]; $sql = mysql_query("SELECT * FROM busca WHERE conteudo LIKE '%$pesquisa%'"); $quant_campos = mysql_num_rows($sql); if($quant_campos == 0){ header('location:http://www.meudominio.com.br/nenhumresultado.php'); }else{ while($linha = mysql_fetch_array($sql)){ $id = $linha['id']; $titulo = $linha['titulo']; $conteudo = $linha['conteudo']; if(!array_search($id, $id_mostrado)){ echo "<div class='resultado'> <p>".$conteudo."</p> </div> <br /> "; array_push($id_mostrado, $id); } } }//do else //for($i;$i<count($id_mostrado);$i++){ //echo $id_mostrado[$i]."<br />"; //} }//do for }//so else campo vazio }//do if botão pressionado ?> Atenciosamente, Phil
  7. Boa noite, estou com problema para exibir a foto no browser o repeater traz todas as informações do banco menos a foto. Inseri os dados manualmente no banco.//TABELACREATE TABLE [dbo].[Imoveis]([CodImovel] [int] IDENTITY(1,1) NOT NULL,[Descricao] [varchar](750) NOT NULL,[QtdDorms] [int] NOT NULL,[TipoImovel] [varchar](7) NOT NULL,[Localizacao] [varchar](6) NOT NULL,[Valor] [money] NOT NULL,[Operacao] [varchar](7) NULL,[Cidade] [varchar](75) NULL,[Foto] [varchar](150) NULLPRIMARY KEY CLUSTERED ([CodImovel] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]//OBJETO DE TRANSFERENCIAusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Entities{public class Imovel{public int CodImovel { get; set; }public string Descricao { get; set; }public int QtdDorms { get; set; }public string TipoImovel { get; set; }public string Localizacao { get; set; }public double Valor { get; set; }public string Operacao { get; set; }public string Cidade { get; set; }public string Foto { get; set; }}}//DAL://Conexão com o banconamespace DAL{public class Conexao{public static string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["EDGImoveisConnectionString"].ConnectionString;public static SqlConnection connection = new SqlConnection(connectionString);public static void Conectar(){if (connection.State == System.Data.ConnectionState.Closed){connection.Open();}}public void Desconectar(){if (connection.State == System.Data.ConnectionState.Open){connection.Close();}}}}namespace DAL{public class ImovelDao{public List<Imovel> ObterTodasCasas(){try{var command = new SqlCommand();command.Connection = Conexao.connection;command.CommandText = "SELECT * FROM Imoveis";Conexao.Conectar();var reader = command.ExecuteReader();var imoveis = new List<Imovel>();while (reader.Read()){var imovel = new Imovel();imovel.CodImovel = Convert.ToInt32(reader["CodImovel"]);imovel.Descricao = reader["Descricao"].ToString();imovel.QtdDorms = Convert.ToInt32(reader["QtdDorms"]);imovel.TipoImovel = reader["TipoImovel"].ToString();imovel.Localizacao = reader["Localizacao"].ToString();imovel.Valor = Convert.ToDouble(reader["Valor"]);imovel.Foto = reader["Foto"].ToString();imoveis.Add(imovel); }return imoveis;}catch (Exception){throw;}}}}//BLLnamespace BLL{public class ImovelBo{private ImovelDao _ImovelDao;public List<Imovel> ObterTodasCasas(){_ImovelDao = new ImovelDao();return _ImovelDao.ObterTodasCasas();}}}//.CSnamespace EDGOficial.Painel{public partial class Imoveis : System.Web.UI.Page{private ImovelBo _imovelBo;protected void Page_Load(object sender, EventArgs e){CarregarImoveisNoRepeater();}private void CarregarImoveisNoRepeater(){_imovelBo = new ImovelBo();RepeaterCasas.DataSource = _imovelBo.ObterTodasCasas();RepeaterCasas.DataBind();}}}//.ASPX<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><div id="paginas"><asp:Repeater ID="RepeaterCasas" runat="server"><ItemTemplate><div class="capaCasa"><img src="../Content/ImagensCasas/" <%#DataBinder.Eval(Container.DataItem,"Foto") %> "/></div><div class="NomeCasa"><%#DataBinder.Eval(Container.DataItem,"Descricao") %></div></div></ItemTemplate></asp:Repeater></div></asp:Content>Se alguém ai puder ajudar agradeço muito!! :D
  8. Preciso de ajuda, ta dando esse erro Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/u140970847/public_html/painel/altenticacao/connect.php on line 5 logo em baixo tem os dados.. não sei se ta certo <? session_start(); $conn = mysqli_connect('localhost', 'user', 'password', 'dbname'); mysql_select_db($_dbDatabase); else{ echo "Erro ao conectar-se com o banco"; exit; } ?>
  9. estou tendo um problema com o mysql, eu tenho um painel onde edita valores, e alguns desses valores são códigos html, quando esta sem esses códigos ele envia d boa, mais quando tem da esse erro "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'll find a way to make that experience even better by browsing our Shop." preciso de ajuda! vou deixa as prints: http://prntscr.com/blujpj http://prntscr.com/bluk0n http://prntscr.com/bluk78 http://prntscr.com/blukjr
  10. Segue abaixo o codigo não consigo chamar a função... a main executa e fecha o programa #include<conio.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include<time.h> #define MAX_LEN 128 float circulo(float dia) //função que calcula a área do círculo {float r, area, PI; PI=3.14159265; r = dia/2; area = PI*r*r; return(area);} float losango(float D1,float D2) //função que calcula a area do losango {float area; area=(D1*D2)/2; return(area);} float paralelogramo(float alt, float base) // função que calcula a area do paralelogramo {float area; area=base*alt; return(area);} float trapezio(float B_maior, float b_menor,float alt) //função que calcula a area do trapézio {float area; area=((B_maior+b_menor)/2)*alt; return(area);} float tri_equi(float A, float B, float C) //função que calcula a area do triangulo equilatero {float area; area= ((A*A)/4)*1.732050808; return (area);} float tri(float A, float B, float C) //função que calcula a area do triangulo {float area; area=(B*A)/2; return(area);} float esf(float dia) //função que calcula o volume da esfera {float r, vol; r=dia/2; vol=((4*3.14159265)/3)*r*r*r; return (vol);} float cone(float dia, float alt) //função que calcula o volume do cone {float r, vol; r=dia/2; vol=(3.14159265/3)*r*r*alt; return(vol);} float cilindro(float dia, float alt) //função que calcula o volume do cilindro {float r, vol; r=dia/2; vol=3.14159265*r*r*alt; return(vol);} float paral(float comp, float larg, float alt) //função que calcula o volume do paralelepípedo {float vol; vol=comp*larg*alt; return(vol);} float m_j(float num) //função que converte metros para jardas {float total; total= num*1.09361; return (total);} float j_m(float num) //função que converte jardas para metros {float total; total= num/1.09361; return(total);} float cmcub_polcub(float num) //função que converte cent. cub. para pol cub {float total; total=num/16.387064; return(total);} float polcub_cmcub(float num) //função que converte pol cub. para cent. cub {float total; total= num*16.387064; return(total);} float l_gl(float num) //função que converte litros em galoes {float total; total= num*0.2642; return(total);} float gl_l(float num) //função que converte galoes em litros {float total; total= num/0.2642; return(total);} float kg_lib(float num) //função que converte quilos em libras {float total; total= num*2.20462262; return(total);} float lib_kg(float num) //função que converte libras em quilos {float total; total= num/2.20462262; return(total);} int programa() { int i, numeroSorteado,logo; system("color F3"); int opcao; do{ //primeiro looping //menu principal printf("********************************************************************************"); puts ("\n\n\t\t********** P R O G R A M A M E N U **********"); printf("\n\n********************************************************************************"); puts("\n\n \tEscolha a opcao desejada:"); puts("\n\t 1 - Calcular area de figuras planas"); puts("\t 2 - Calcular volume de solidos geometricos"); puts("\t 3 - Conversao de medidas"); puts("\t 4 - Mega sena"); puts("\t 5 - Sair"); printf("\n\t\t\t\tOpcao: "); scanf ("%d", &opcao); fflush(stdin); //limpa o buffer do teclado system("cls"); //limpa a tela switch (opcao) //escolha { case 1: do //segundo looping { //submenu 1 printf("\n\n********************************************************************************"); puts("\n\n\t\t********** AREA DE FIGURAS PLANAS **********"); printf("\n\n********************************************************************************"); puts("\t\n Escolha a opcao desejada:"); puts("\n\t 1 - Circulo"); puts("\t 2 - Losango"); puts("\t 3 - Paralelogramo"); puts("\t 4 - Trapezio"); puts("\t 5 - Triangulo"); puts("\t 0 - Retornar"); printf("\t\t\t\tOpcao: "); scanf("\n\t%d", &opcao); fflush(stdin); system("cls"); float dia, area, d1, d2, base, alt; //declaração das float A, B, C; // variáveis que serão usadas no switch switch(opcao) //segunda escolha { case 1: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 1. AREA DO CIRCULO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite o diametro do circulo: "); scanf("%f", &dia); area= circulo(dia); printf("\n\n\n\n\n\t>>> A area do circulo e %f", area); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 2: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 2. AREA DO LOSANGO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite a diagonal 1: "); scanf("%f", &d1); printf("\n\tDigite a diagonal 2: "); scanf("%f", &d2); area= losango(d1,d2); printf("\n\n\t>>> A area do losango e %f", area); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 3: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 3. AREA DO PARALELOGRAMO **********"); printf("\n\n********************************************************************************"); printf("\n\n\n\tDigite a base: "); scanf("%f", &base); printf("\n\tDigite a altura: "); scanf("%f", &alt); area=paralelogramo(base,alt); printf("\n\n\t>>> A area do paralelogramo e %f", area); printf("\n\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 4: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 4. AREA DO TRAPEZIO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite a base maior: "); scanf("%f", &B); printf("\n\tDigite a base menor: "); scanf("%f", &base); printf("\n\tDigite a altura: "); scanf("%f", &alt); area=trapezio(B,base,alt); printf("\n\n\t>>> A area do trapezio e: %f", area); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 5: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 5. AREA DO TRIANGULO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite o lado A do triangulo: "); scanf("%f", &A); printf("\n\tDigite o lado B do triangulo: "); scanf("%f", &B); printf("\n\tDigite o lado C do triangulo: "); scanf("%f", &C); if(A==B && B==C) { area=tri_equi(A,B,C); printf(" \n\n\n\t\tTriangulo Equilatero >>> area: %f", area); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); } else if(A!=B && B!=C && A!=C) { area=tri(A,B,C); printf("\n\n\n\t\tTriangulo Escaleno >>> area: %f", area); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); } else if(A==C && A!=B && B!=C||A==B&&A!=C&&B!=C||C==B&&C!=A&&B!=A) { area=tri(A,B,C); printf("\n\n\n\t\tTriangulo Isosceles >>> area: %f", area); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); } break; case 0: system("return"); break; default: return 0; printf ("\n\n ******************************* opcao invalida ********************************"); printf ("Pressione <ENTER> para retornar ao menu"); getch(); } //fecha o "segunda escolha" system("cls"); } //fecha o segundo looping while (opcao!=0); //condição para voltar para o submenu 1 break; //vai direto para o fim do primeiro switch sem testar os demais case case 2: do //terceiro looping { // submenu 2 printf("\n\n********************************************************************************"); puts("\n\n\t\t********** VOLUME DE SOLIDOS GEOMETRICOS **********"); printf("\n\n\n********************************************************************************"); puts("\n\t Escolha a opcao desejada:"); puts("\n\t 1 - Esfera"); puts("\t 2 - Cone Circular"); puts("\t 3 - Cilindro"); puts("\t 4 - Paralelepipedo"); puts("\t 0 - Retornar"); printf("\n\t\t\t\tOpcao: "); scanf("%d", &opcao); fflush(stdin); system("cls"); float dia, vol, alt, comp, larg; switch (opcao) { case 1: printf("\n\n\n********************************************************************************"); puts("\n\n\t\t********** 1. VOLUME DA ESFERA **********"); printf("\n\n********************************************************************************"); printf("\nDigite o diametro: "); scanf("%f", &dia); vol=esf(dia); printf("\n\n\n\t>>> O volume da esfera e %f.", vol); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 2: printf("\n\n\n********************************************************************************"); puts ("\n\n\t\t********** 2. VOLUME DO CONE CIRCULAR **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite o diametro da base: "); scanf("%f",&dia); printf("\n\tDigite altura: "); scanf("%f",&alt); vol=cone(dia,alt); printf("\n\t>>> O volume do cone circular e %f.", vol ); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 3: printf("\n\n\n********************************************************************************"); puts("\n\n\t\t********** 3. VOLUME CILINDRO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite o diametro: "); scanf("%f",&dia); printf("\n\tDigite altura: "); scanf("%f",&alt); vol= cilindro(dia,alt); printf("\n\t>>>O volume do cilindro e %f", vol); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 4: printf("\n\n\n********************************************************************************"); puts("\n\n\t\t********** 4. VOLUME DO PARALELEPIPEDO **********"); printf("\n\n********************************************************************************"); printf("\n\tDigite o comprimento: "); scanf("%f",&comp); printf("\n\tDigite a largura: "); scanf("%f",&larg); printf("\n\tDigite a altura: "); scanf("%f",&alt); vol=paral(comp, larg, alt); printf("\n\t>>>O volume do paralelepipedo e %f.",vol); printf("\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 0: system("return"); break; default: printf ("\n\n ******************************* opcao invalida ********************************"); printf ("Pressione <ENTER> para retornar ao menu"); getch(); } //fecha o terceiro switch system("cls"); } while(opcao!=0); //condição para voltar para o submenu 2 break; case 3: do { //submenu 3 printf("\n\n********************************************************************************"); puts("\n\n\t\t********** CONVERSAO DE MEDIDAS **********"); printf("\n********************************************************************************"); puts("\n\t\t\t Escolha a opcao desejada"); puts("\n Converter:\n"); printf(" 1 - Metros para Jardas"); printf("\t\t\t\t 5 - Litros para Galoes\n"); printf("\n 2 - Jardas para Metros"); printf("\t\t\t\t 6 - Galoes para Litros\n"); printf("\n 3 - Centimetros cubicos para Polegadas cubicas"); printf("\t 7 - Quilogramas para Libras\n"); printf("\n 4 - Polegadas cubicas para Centimetros cubicos"); printf("\t 8 - Libras para Quilogramas\n"); puts("\n\n\t\t 0 - Retornar"); printf("\t\t\t\tOpcao: "); scanf("\n\t%d", &opcao); system("cls"); fflush(stdin); float num, result; switch (opcao) { case 1: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 1. METROS EM JARDAS **********"); printf("\n\n********************************************************************************"); printf("\n\n\tDigite o valor em metros a ser convertido: "); scanf("%f", &num); result= m_j(num); printf("\n\n\t\t %f m = %f yd", num, result); printf("\n\n\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 2: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 2. JARDAS EM METROS **********"); printf("\n\n********************************************************************************"); printf("\n\n\tDigite o valor em jardas a ser convertido: "); scanf("%f", &num); result= j_m(num); printf("\n\n\t\t %f yd = %f m", num, result); printf("\n\n\n\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 3: printf("\n\n********************************************************************************"); puts("\n\n\t********* 3. CENTIMETROS CUBICOS EM POLEGADAS CUBICAS **********"); printf("\n\n********************************************************************************"); printf("\n\n\tDigite o valor em centimetros cubicos a ser convertido: "); scanf("%f", &num); result= cmcub_polcub(num); printf("\n\n\t\t %f cm3 = %f in3", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 4: printf("\n\n********************************************************************************"); puts("\n\n\t********** 4. POLEGADAS CUBICAS EM CENTIMETROS CUBICOS **********"); printf("\n\n********************************************************************************"); printf("\nDigite o valor em polegadas cubicas a ser convertido: "); scanf("%f", &num); result= polcub_cmcub(num); printf("\n\n\t\t %f in3 = %f cm3", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 5: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 5. LITROS EM GALOES **********"); printf("\n\n********************************************************************************"); printf("\nDigite o valor em litros a ser convertido: "); scanf("%f", &num); result= l_gl(num); printf("\n\n\t\t %f L = %f gal", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 6: printf("\n\n********************************************************************************"); puts("\n\n\t\t********** 6. GALOES EM LITROS **********"); printf("\n\n********************************************************************************"); printf("\nDigite o valor em galoes a ser convertido: "); scanf("%f", &num); result= gl_l(num); printf("\n\n\t\t %f gal = %f L", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 7: printf("\n\n********************************************************************************"); puts("\n\n\t********** 7. QUILOGRAMAS EM LIBRAS **********"); printf("\n\n********************************************************************************"); printf("\nDigite o valor em quilogramas a ser convertido: "); scanf("%f", &num); result= kg_lib(num); printf("\n\n\t\t %f kg = %f lb", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 8: printf("\n\n********************************************************************************"); puts("\n\n\t********* 8. LIBRAS EM QUILOGRAMAS **********"); printf("\n\n********************************************************************************"); printf("\nDigite o valor em libras a ser convertido: "); scanf("%f", &num); result= lib_kg(num); printf("\n\n\t\t %f lb = %f kg", num, result); printf("\n\n********************************************************************************"); printf("\n\n Pressione <ENTER> para retornar ao menu."); getch(); break; case 0: system("return"); break; default: printf ("\n\n ******************************* opcao invalida ********************************"); printf ("Pressione <ENTER> para retornar ao menu"); getch(); } case 4: srand(time(NULL)); for(i=1; i<=6; i++) { numeroSorteado = rand() % 60 +1; printf("Numero %d: %d\n", i, numeroSorteado); } printf("\n\n\n"); printf ("Pressione <ENTER> para retornar ao menu"); break; system("cls"); } while(opcao!=0); //cond. volta para o terceiro submenu break; case 5: system("exit"); break; default: printf ("\n\n ******************************* opcao invalida ********************************"); printf ("Pressione <ENTER> para retornar ao menu"); } //fecha o primeito switch getch(); system("cls"); } //fecha o primeiro looping while (opcao!=5); return 0; } int print_image(FILE *fptr); int main(void) { char *filename = "athena.txt"; FILE *fptr = NULL; if((fptr = fopen(filename,"r")) == NULL) { fprintf(stderr,"error opening %s\n",filename); return 1; } char read_string[MAX_LEN]; while(fgets(read_string,sizeof(read_string),fptr) != NULL) printf("%s",read_string); fclose(fptr); printf ("\n\n Precione Ener para continuar \n\n\n"); int programa(); }
  11. Boa tarde galera, estou desenvolvendo um projeto e nele tenho que fazer sistema de categorias com sub categorias, com até 2 níveis. hoje eu tenho esse código: try { $query = "SELECT * FROM tipos_ocorrencias"; $cont = 1; $result = $conn->query($query); while($all_user = $result->fetch(PDO::FETCH_ASSOC)){ $id = $all_user['id_tipo']; $nome = $all_user['title_tipo']; $status = $all_user['status_tipo']; $paiId = $all_user['pai_tipo']; $PaiNome = $all_user['pai_nome_tipo']; $ordem = $all_user['ordem_tipo']; if($ordem == 3){ $query = "SELECT title_tipo FROM tipos_ocorrencias WHERE id_tipo=(SELECT pai_tipo FROM tipos_ocorrencias WHERE id_tipo={$paiId}) "; $result = $conn->prepare($query); $result->execute(); $all_user = $result->fetch(); $nivel1 = $all_user['title_tipo']; $nome = $nivel1." > ".$PaiNome." > ".$nome; }else{ $nome = ($paiId != ) ? $PaiNome." > ".$nome : $nome ; } if ($status == 1){ $acao = "Desativar <span class='glyphicon glyphicon-remove-sign'>"; $status = "Ativado"; }else{ $acao = "Ativar <span class='glyphicon glyphicon-ok-sign'>"; $status = "Desativado"; } print(" <tr> <td>".$cont."</td> <td>".$nome."</td> <td>".$status."</td> <td> <a href='views?view=tiposocorrencias&&deletar=".$id."'>Excluir <span class='glyphicon glyphicon-trash'></span></a> &nbsp;&nbsp;&nbsp;&nbsp; <a href='views?view=tiposocorrencias&&status=".$id."'>".$acao."</a> </td> </tr> "); $cont++; } }catch(PDOException $erro){ var_dump($erro); } Ele está me resultando apenas um dos sub-menus que tenho cadastrado No banco eu tenho mais um sub menu cadastrado dentro do menu Interfone só que o código só printa 1 deles, não importa quantos eu cadastro ele só aparece um de cada. Por favor me ajudem.
  12. Olá pessoal, Me chamo Michael, sou novo aqui. Eu queria saber como corrigir este erro pois estou tentando compilar com (CMD + g++ / c++) e estou recebendo estes erros logo abaixo: c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ld.exe: cannot find -lSDL c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ld.exe: cannot find -lSDL_image c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ld.exe: cannot find -lGL c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ld.exe: cannot find -lGLU collect2.exe: error: ld returned 1 exit status Obrigado a todos pela atenção!
  13. Prezados, boa noite! Seguinte, estou cursando o primeiro período de Ciência da Computação na minha cidade. O professor de "Programação de Computadores I" está passando um trabalho para entregar sobre vetores. Ele quer o código funcionando e precisamos apresentar o código para o mesmo. Porém, estou com um problema que não estou conseguindo resolver. O que ele pediu como o primeiro "exercício" do trabalho é: "Leia o peso, em quilogramas, de N bois e calcule e imprima: a) o peso médio do rebanho; b) o peso do boi mais gordo; e c) o peso do boi mais magro. Encerre a leitura quando um peso nulo for digitado." Eu fiz, porém, fiz um pouco diferente, coloquei para o usuário definir o número de vetores ("bois") antes de iniciar à inserir os pesos dos mesmos. Segue abaixo: "#include <stdio.h> int main() { int n = 0, i, imenor, imaior; float v[n], media, maior, menor; media = 0.0; //Definir o valor do vetor. printf("Insira o numero de bois em seu rebanho: "); scanf("%i", &n); // Leitura dos pesos. for(i=0; i < n; i++){ printf("Insira o peso do boi %d: ",i+1); scanf("%f",&v); } // Cálculo média. for(i=0; i < n; i++) media=media+v; media=media/n; // Preparando para encontrar o maior e o menor valor. maior = menor = v[0]; imaior = imenor = 0; // Laço encontra índice e maior valor. for(i=1; i < n; i++) if (v > maior){ maior = v; imaior = i; } // Laço encontra índice e menor valor. for(i=1; i < n; i++) if (v < menor){ menor = v; imenor = i; } // Mostrando valores encontrados. printf("O seu rebanho contém:\n"); printf("Um peso medio de = %.2f \n", media); printf("O maior peso no rebanho é: = %.2f, no boi %d\n",maior, imaior+1); printf("O menor peso no rebanho é: = %.2f, no boi %d\n", v[imenor], imenor+1); }" Porém, quando coloco o valor de 8 ou acima de 8 vetores o peso do mais mais magro é sempre 0, independente se ele tem o maior peso ou não. Se colocar 7 vetores ou menos ele coloca o valor correto do boi. Poderiam me ajudar por favor?
  14. galera, estou precisando de ajuda urgente, eu usava o corel draw x7, e do nada expirou, ai instalei o x8, mas não gostei da instalação e desinstalei, e instalei o x7 novamente, depois disso, nenhuma miniatura do corel draw x7 aparece, e isso é horrivel! já fiz varios procedimentos pra miniatura voltar a aparecer, mas não fui bem sucedido, aguém pode me ajudar?
  15. BOA TARDE AMIGOS ! MEU PROGRAMA ESTÁ RODANDO COM ERRO GRAVE. NA OPÇÃO 1 DO MENU ELE CADASTRA , ATÉ AE TUDO CERTO QUANDO APERTO A OPÇÃO 3,4,5 ELE DÁ ERRO , já REVI O CODIGO POR VEZES E não ACHO O QUE PODE SER. SE alguém PUDER AUXILIAR, AGRADEÇO ! #include <stdio.h> #include <conio.h> #include <windows.h> #include <string.h> #define MAX 20 typedef struct contrato { short int cod_vc; // codigo do veiculo ( entre 1000 e 9999) short int cod_cl; // codigo cliente (entre 1000 e 9999) float preco_dia; // valor diario em unidades monetarias € - caravanas -100€/dia float preco_km; // valor em Km andado em unidades metricas - autocaravanas - 2€/Km float qt_km; // quilometros percoridos //data_tipo data_ini; // data inicio aluguer - 01 jan 2012 //data_tipo data_fim; // data fim de aluguer char escritorio_ini[10]; // escritorio onde o veiculo é alugado - Lisboa Porto Coimbra Algarve Braga Aveiro char escritorio_fim[10]; // escritorio onde o veiculo é devolvido - Lisboa Porto Coimbra Algarve Braga Aveiro }contrato_tipo; // estrutura veiculo typedef struct veiculo { short int cod_vc; // codigo veiculo (entre 10 e 99) char marca[10]; // marca veiculo autocaravanas - Adria (Coral,Action) Burstner(Travel,Club,Holiday) Kabe(Travelmaster) char modelo[10]; // modelo veiculo // caravanas - Adria (Linea,Adora, Alpina) Burstner(City,) Kabe (Royal,Eximo) char matricula[8]; // matricula do veiculo 00-00-AA short int cod_categoria; // categoria do veiculo: autocaravanas - capucine, integral, perfilada, furgao | caravanas - citadina, utilitaria, familiar float km; // quilometragem actual do veiculo em Km float qt_comb; // quantidade de combustivel no deposito em Litros char estado; // estado veiculo : 'D' - disponivel; 'A' - alugado }veiculo_tipo; // estrutura cliente typedef struct cliente // nome cliente desnecessário { short int cod_cl; // código cliente (entre 1000 e 9999) // short int –32,768 to 32,767 char nome [30]; // nome do cliente maximo 30 caracteres char morada[40]; // morada do cliente maximo 40 caracteres short int tipo; // tipo de cliente ( 0- cliente normal; 1- cliente de risco) char carta_conducao[5]; // numero de carta de condução 123456 veiculo_tipo veiculo; contrato_tipo contrato; }cliente_tipo; // estrutura data typedef struct data { short int dia; // dia 1-31 char mes[3]; // jan,fev...dez short int ano; // ano 2012 }data_tipo; char categoria[][20]={"capucine","integral","perfilada","furgao","citadina","utilitaria","familiar"}; short int mes_dias[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; // funcoes escrever/ler/mostrar/eliminar/alterar cliente, veiculo, contrato, data //funcao escrever cliente/veiculos/contratos void escrever_cliente(cliente_tipo *cliente, int qtd_clientes) { int i; char D,A; for(i=0;i<qtd_clientes;i++) { //**** clientes *****// printf(" \n\n --- cliente %d --- ",i+1); fflush(stdin); //limpa o buffer do teclado printf(" \n qual o codigo do cliente ? "); scanf("%d",&cliente.cod_cl); // -> porque cliente é um vetor while(cliente.cod_cl<1000 || cliente.cod_cl>9999 && cliente.cod_cl != cliente.cod_cl) // falta - os codigos não podem ser iguais na mesma estrutura { printf(" \n erro ! digite o codigo do cliente com 4 digitos \n"); scanf("%d",&cliente.cod_cl); // gets - le strings (cadeia de caracteres com espaços), scanf - le so numeros ou uma unica letra ? } fflush(stdin); printf(" \n qual o nome do cliente ? "); gets(cliente.nome); // equivalente a : scanf("%d",&(*cliente).nome); x-> igual a (*x). fflush(stdin); printf(" \n qual o morada do cliente ? "); gets(cliente.morada); fflush(stdin); printf(" \n qual o tipo de cliente ? "); scanf("%d",&cliente.tipo); while(cliente.tipo!=0 && cliente.tipo!=1) { printf(" \n erro ! digite o tipo de cliente 0- cliente normal 1- cliente de risco \n"); scanf("%d",&cliente.tipo); // gets - le strings (cadeia de caracteres com espaços), scanf - le so numeros ou uma unica letra ? } fflush(stdin); printf(" \n qual o numero da carta de conducao ? "); gets(cliente.carta_conducao); // equivalente a : scanf("%d",&(*cliente).nome); x-> igual a (*x). //**** veiculos *****// printf(" \n\n --- veiculo %d --- ",i+1); fflush(stdin); //limpa o buffer do teclado printf(" \n qual o codigo do veiculo ? "); scanf("%d",&cliente.veiculo.cod_vc); // você - codigo do veiculo while(cliente.veiculo.cod_vc < 10 || cliente.veiculo.cod_vc > 99) // falta - os codigos não podem ser iguais na mesma estrutura { printf(" \n erro ! digite o codigo do veiculo com 2 digitos \n"); scanf("%d",&cliente.veiculo.cod_vc); // gets - le strings (cadeia de caracteres com espaços), scanf - le so numeros ou uma unica letra ? } fflush(stdin); printf(" \n qual a marca do veiculo ? "); // < Adria ou Burstner ou Kabe> gets(cliente.veiculo.marca); fflush(stdin); printf(" \n qual o modelo do veiculo ? "); // < autocaravanas - Adria(Coral,Action), Burstner(Travel,Club,Holiday) e Kabe(Travelmaster) | caravanas - Adria(Linea,Adora,Alpina), Burstner(City,) e Kabe (Royal,Eximo) > gets(cliente.veiculo.modelo); fflush(stdin); printf(" \n qual a matricula do veiculo ? "); // < 00-00-AA > gets(cliente.veiculo.matricula); fflush(stdin); printf(" \n qual o numero da categoria do veiculo ? "); // codigo categoria deve variar entre 0 e 4 // <autocaravanas - 1-capucine, 2-integral, 3-perfilada, 4-furgao | caravanas - 5-citadina, 6-utilitaria, 7-familiar > scanf("%d",&cliente.veiculo.cod_categoria); fflush(stdin); printf(" \n quilometragem actual do veiculo ?"); scanf("%f",&cliente.veiculo.km); fflush(stdin); printf(" \n qual a quantidade de combustivel no deposito ? "); scanf("%f",&cliente.veiculo.qt_comb); fflush(stdin); printf("\n qual o estado do veiculo? <'D' -disponivel ou 'A' - alugado> "); scanf("%c",&cliente.veiculo.estado); while(cliente.veiculo.estado != 'D' && cliente.veiculo.estado != 'd' && cliente.veiculo.estado != 'A' && cliente.veiculo.estado != 'a') { printf("\n opcao invalida! qual o estado do veiculo? <'D' -disponivel ou 'A' -alugado >\n"); scanf("%c",&cliente.veiculo.estado); // gets - le strings (cadeia de caracteres com espaços), scanf - le so numeros ou uma unica letra ? } //**** contratos *****// printf(" \n\n --- contrato %d --- ",i+1); printf(" \n o codigo do cliente %d e %hd ",i+1,cliente.cod_cl); fflush(stdin); printf(" \n o codigo do veiculo %d e %hd ",i+1,cliente.veiculo.cod_vc); fflush(stdin); printf(" \n qual o preço diario de aluguer ? <caravanas> "); scanf("%f",&cliente.contrato.preco_dia); fflush(stdin); printf(" \n qual o preço por quilometro ? <autocaravanas>"); scanf("%f",&cliente.contrato.preco_km); fflush(stdin); printf(" \n quantos quilometros percorridos ? "); scanf("%f",&cliente.contrato.qt_km); fflush(stdin); /*printf(" \n qual a data de inicio de aluguer ? "); scanf("%s",&cliente.contrato.data_ini); fflush(stdin); printf(" \n qual a data de fim de aluguer ? "); scanf("%s",&cliente.contrato.data_fim); fflush(stdin); */ printf(" \n qual o destrito do escritorio em que alugou o veiculo ? "); gets(cliente.contrato.escritorio_ini); fflush(stdin); printf(" \n qual o destrito do escritorio em que devolveu o veiculo ? "); gets(cliente.contrato.escritorio_fim); fflush(stdin); printf("\n prima qualquer tecla para continuar"); getchar(); } } // mostra todos os clientes guardados em memoria, o parametro qtd_clientes é a quantidade de clientes void mostrar_cliente(cliente_tipo *cliente, int qtd_clientes) {//permite visualizar o conteudo da estrutura , só printf´s com %s ou %d int i; for(i=0;i<qtd_clientes;i++) { printf(" \n\n cliente %d ",i+1); printf(" \n codigo do cliente : %d ",cliente.cod_cl); printf(" \n nome do cliente : %s ",cliente.nome); printf(" \n morada : %s ",cliente.morada); printf(" \n tipo de cliente : %d ",cliente.tipo); printf(" \n numero carta conducao : %s ",cliente.carta_conducao); printf(" \n\n veiculo %d ",i+1); printf(" \n codigo do veiculo : %d ",cliente.veiculo.cod_vc); printf(" \n marca do veiculo : %s ",cliente.veiculo.marca); printf(" \n modelo do veiculo : %s ",cliente.veiculo.modelo); printf(" \n matricula do veiculo : %s ",cliente.veiculo.matricula); printf(" \n categoria do veiculo : %d ",cliente.veiculo.cod_categoria); printf(" \n quilometragem atual do veiculo : %.3f Km",cliente.veiculo.km); printf(" \n quantidade de combustivel no deposito : %.3f Litros",cliente.veiculo.qt_comb); printf(" \n estado do veiculo : %c ",cliente.veiculo.estado); printf(" \n\n contrato %d ",i+1); printf(" \n codigo do cliente : %d ",cliente.cod_cl); printf(" \n codigo do veiculo : %d ",cliente.veiculo.cod_vc); printf(" \n preço em euros por dia de aluguer : %.2f ",cliente.contrato.preco_dia); printf(" \n preço por km : %.2f ",cliente.contrato.preco_km); printf(" \n quilometros percorridos : %.3f ",cliente.contrato.qt_km); //printf(" \n data inicio de aluguer : %s ",cliente.contrato.data_ini); //printf(" \n data fim de aluguer : %s ",cliente.contrato.data_fim); printf(" \n escritorio veiculo alugado : %s ",cliente.contrato.escritorio_ini); printf(" \n escritorio veiculo devolvido: %s ",cliente.contrato.escritorio_fim); } printf(" \n prima qualquer tecla para continuar"); // se premido alguma tecla sai da funcao void mostrar_cliente(cliente_tipo *cliente, int qtd_clientes) getchar(); // le as teclas digitadas sai } int ler_quantidade_clientes() //pergunta quantos clientes pretende guardar e retorna esse numero {// le um numero positivo e inferior a MAX - 20 int qtd_clientes,i; do { printf("\n qual a quantidade maxima de clientes ( entre 1 e %d): ",MAX); scanf("%d",&qtd_clientes); }while (qtd_clientes<1 || qtd_clientes >MAX); return qtd_clientes; } // e) funcao procura e mostra todos os clientes com o nome indicado no vetor nome[10] void procurar_clientes(cliente_tipo cliente[], char nome[], int qtd_clientes) // cliente[] = *cliente { int i, flag=1; // 1 = verdadeiro (qualquer numero != 0 ) , 0= falso for(i=0;i<qtd_clientes && flag;i++) // se a flag tambem for verdadeira (!= 0) 1,2,3,4... { if(strcmp(cliente.nome,nome)==0) // compara duas strings, comeca por comparar o primeiro caracter de cada string se forem ambas iguais continua a percorer a string até chegar ao null ou até que algum par ( de strings)seja diferente // se retornar 0 as strings são iguais, se for >0 o caracter diferente e maior na string1 (a.cidade) do que na string2 (cid) // se for <0 exactamente o contrario { printf(" \n\n cliente %d ",i+1); printf(" \n codigo cliente : %d ",cliente.cod_cl); printf(" \n nome cliente : %s ",cliente.nome); printf(" \n morada : %s ",cliente.morada); printf(" \n tipo de cliente : %d ",cliente.tipo); printf(" \n numero carta conducao : %s ",cliente.carta_conducao); printf(" \n\n veiculo %d ",i+1); printf(" \n codigo do veiculo : %d ",cliente.veiculo.cod_vc); printf(" \n marca do veiculo : %s ",cliente.veiculo.marca); printf(" \n modelo do veiculo : %s ",cliente.veiculo.modelo); printf(" \n matricula do veiculo : %s ",cliente.veiculo.matricula); printf(" \n categoria do veiculo : %d ",cliente.veiculo.cod_categoria); printf(" \n quilometragem atual do veiculo : %.3f Km",cliente.veiculo.km); printf(" \n quantidade de combustivel no deposito : %.3f Litros",cliente.veiculo.qt_comb); printf(" \n estado do veiculo : %c ",cliente.veiculo.estado); printf(" \n\n contrato %d ",i+1); printf(" \n codigo do cliente : %d ",cliente.cod_cl); printf(" \n codigo do veiculo : %d ",cliente.veiculo.cod_vc); printf(" \n preço em euros por dia de aluguer : %.2f ",cliente.contrato.preco_dia); printf(" \n preço por km : %.2f ",cliente.contrato.preco_km); printf(" \n quilometros percorridos : %.3f ",cliente.contrato.qt_km); //printf(" \n data inicio de aluguer : %s ",cliente.contrato.data_ini); //printf(" \n data fim de aluguer : %s ",cliente.contrato.data_fim); printf(" \n escritorio veiculo alugado : %s ",cliente.contrato.escritorio_ini); printf(" \n escritorio veiculo devolvido: %s ",cliente.contrato.escritorio_fim); flag=0; // é falso } } getchar(); } /* alterar clientes void alterar_cliente( cliente_tipo *cliente, int *qtd_clientes) { int i, esc; // esc - escolha da opção printf("\n qual o cliente que deseja alterar ?"); gets(cliente.nome); // equivalente a : scanf("%d",&(*cliente).nome); x-> igual a (*x). fflush(stdin); printf("\n qual o campo que deseja alterar 1- codigo cliente 2- nome 3- morada 4- tipo de cliente 5- carta conduçao?"); fflush(stdin); scanf("%d",&esc); // determina a escolha a efectuar switch(esc) { case'1': printf ("\n vai alterar o codigo do cliente"); gets(cliente.cod_cl); fflush(stdin); printf ("\n codigo do cliente alterado ! "); break; case'2': printf ("\n vai alterar o nome do cliente"); gets(cliente.nome); fflush(stdin); printf ("\n nome do cliente alterado ! "); break; case'3': printf ("\n vai alterar a morada do cliente"); gets(cliente.morada); fflush(stdin); printf ("\n morada do cliente alterada ! "); break; case'4': printf ("\n vai alterar o tipo de cliente"); gets(cliente.tipo); fflush(stdin); printf ("\n tipo de cliente alterado ! "); break; case'5': printf ("\n vai alterar o numero de carta conducao do cliente"); gets(cliente.carta_conducao); fflush(stdin); printf ("\n numero de carta de conducao alterada ! "); break; default : printf("\n nenhum dos campos foi alterado "); } } */ //eliminar clientes void eliminar_cliente(int pos,cliente_tipo *cliente, int *qtd_clientes) { int i; for (i=pos;i<=*qtd_clientes-1;i++) cliente=cliente[i+1]; (*qtd_clientes)--; // retira um cliente } // menu de opções char formulario () // não é void formulario (), mas sim char formulario () porque retorna os caracteres { char r; // o caracter digitado é guardado em r do { system ("cls"); // limpa o monitor, é um comando do windows (DOS cmd) , system ("cls"); == a system("dir"); , ou char s="cd bin" , system (cd); printf(" 1- Inserir clientes \n"); printf(" 2- Mostrar clientes \n"); printf(" 3- Procurar cliente por nome \n"); printf(" 4- Alterar cliente \n"); printf(" 5- Eliminar cliente \n"); printf(" s/S- Sair \n"); r=getchar(); // le o caracter digitado guarda como r e depois vai para a funcao }while (r!= 's' && r!= 'S' && r!= '1' && r!= '2' && r!= '3' && r!= '4' && r!= '5'); return r; } int main() // retorna um inteiro 0 é certo ? , 1 é errado ? { char ch, nome[30]; int qtd_clientes=0,i,pos,a; cliente_tipo cliente[MAX+1]; // cliente_tipo cliente; e não veiculo_tipo disciplina porque a estrutura veiculo está dentro da estrutura cliente, estrutura cliente é a principal ? do { ch=formulario(); switch(ch) { //preenche os vetores da estrutura cliente case '1' : { // retorna a quantidade de clientes a analisar qtd_clientes=ler_quantidade_clientes(); escrever_cliente(cliente,qtd_clientes); break; } // lista todos os clientes case'2' : { mostrar_cliente(cliente,qtd_clientes); //mostrar_cliente(cliente, qtd_clientes) break; } //procura o cliente pelo nome case '3': { printf("\n nome do cliente a procurar ?: "); gets(nome); procurar_clientes(cliente, nome, qtd_clientes); printf("\n prima qualquer tecla para continuar"); getchar(); break; } /* altera o cliente case '4': { alterar_cliente(cliente,qtd_clientes); printf(" \n cliente alterado !"); mostrar_cliente(cliente,qtd_clientes); printf("\n prima qualquer tecla para continuar"); getch(); break; } */ //elimina o cliente case '5': { printf("\n qual a posicao do cliente que quer eliminar ? <posicao 1 ate %d > ",qtd_clientes); scanf("%d",&pos); eliminar_cliente(pos,cliente,&qtd_clientes); printf("\n eliminou o cliente %d \n",pos); printf("\n tem os seguintes clientes registados"); mostrar_cliente(cliente,qtd_clientes); getchar(); break; } } }while(ch!='s' && ch!='S'); system("pause"); return 0; //diferença entre 0 e 1 ?? }
  16. OLA, ESTOU TENTANDO ACESSA O PAINEL DO ADMINISTRADOR E ESTA DANDO ESSE ERRO: General Error Module not accessible BACKTRACE FILE: (not given by php)LINE: (not given by php)CALL: msg_handler()FILE: [ROOT]/includes/functions_module.phpLINE: 563CALL: trigger_error()FILE: [ROOT]/adm/index.phpLINE: 81CALL: p_master->load_active() alguém SABE COMO ARRUMAR? já APAGUEI A PASTA INSTALL SO RESOLVEU A PARTE DO FORUM HOST: hostinger.com.br
  17. Boa tarde. Sou noob em vba para excel. Gostaria que alguém pudesse me ajudar neste código. Fui criando ele no estilo frankstein. Copiando várias rotinas prontas e adaptando. Se puderem depurar e tentar executar essa userform e me relatar os erros e sugerir as alterações cabíveis ficarei grato. Segue abaixo o código: Private Sub Cbo_Condutor_Change() If Not IsNumeric(Cbo_Condutor.Text) Then Sheets("Dados iniciais").Select Cells(3, 2).Value = Me.Cbo_Condutor.Text Else End If End Sub Private Sub Cbo_Isolador_Tipo_Change() Sheets("Dados iniciais").Select Cells(11, 3).Value = Me.Cbo_Isolador_Tipo.Text Call mostra_peso_cadeia Call mostra_comprimento_cadeia End Sub Private Sub Cbo_Tensao_Change() Dim ld As String If Not IsNumeric(Cbo_Tensao.Text) Then Cbo_Tensao.Text = "" MsgBox ("Entre somente com valores numéricos") Else If Me.Cbo_Tensao.Text = 69 Then Cbo_Tensao.Text = " 69" Sheets("Dados iniciais").Select Cells(10, 3).Value = Me.Cbo_Tensao.Text Call mostra_peso_cadeia Call mostra_comprimento_cadeia Else Sheets("Dados iniciais").Select Cells(10, 3).Value = Me.Cbo_Tensao.Text Call mostra_peso_cadeia Call mostra_comprimento_cadeia ld = Right(txtbox_nome_ld.Text, 2) If Not ld = "kV" Then Else txtbox_nome_ld = Left(txtbox_nome_ld, Len(txtbox_nome_ld) - 8) txtbox_nome_ld = txtbox_nome_ld.Text txtbox_nome_ld = txtbox_nome_ld.Text & ", " & Cbo_Tensao.Text & " kV" End If End If End If End Sub Private Sub CommandButton_editar_bd_Click() Dim pass As String pass = InputBox("Entre com a senha do administrador") If pass = "123" Then Unload UserForm1 Else MsgBox ("senha errada, tente novamente") End If ' End Sub Private Sub CommandButton1_Click() Dim i As Integer Dim j As Double j = 1E-40 'On Error GoTo errorhandler 'Vai para a aba Dados iniciais Sheets("Dados iniciais").Select If (txtbox_qtd_vaos_re.Text > 0) And (txtbox_qtd_vaos_vante.Text = 0) Then 'Reseta os valores Cells(93, 2) = Cells(92, 2).Value - j 'Roda a rotina meta9999 Range("B99").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B93") While (Cells(93, 2) < 0) Or (Cells(93, 2) > Cells(92, 2)) Cells(93, 2) = Cells(92, 2).Value - j Range("B99").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B93") j = j * 10 Wend Else If (txtbox_qtd_vaos_re.Text = 0) And (txtbox_qtd_vaos_vante.Text > 0) Then 'Reseta os valores Cells(94, 2) = Cells(92, 2).Value - j 'Roda a rotina meta9999 Range("B100").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B94") While (Cells(94, 2) < 0) Or (Cells(94, 2) > Cells(92, 2)) Cells(94, 2) = Cells(92, 2).Value - j Range("B100").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B94") j = j * 10 Wend Else If (txtbox_qtd_vaos_re.Text > 0) And (txtbox_qtd_vaos_vante.Text > 0) Then 'Reseta os valores Cells(93, 2) = Cells(92, 2).Value - j 'Roda a rotina meta9999 Range("B99").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B93") While Cells(93, 2) < 0 Or Cells(93, 2) > Cells(92, 2) Cells(93, 2) = Cells(92, 2).Value - j Range("B99").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B93") j = j * 10 Wend j = 1E-40 Cells(94, 2) = Cells(92, 2).Value - j Range("B100").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B94") While Cells(94, 2) < 0 Or Cells(94, 2) > Cells(92, 2) Cells(94, 2) = Cells(92, 2).Value - j Range("B100").GoalSeek Goal:=Range("B98").Value, ChangingCell:=Range("B94") j = j * 10 Wend End If End If End If Sheets("Dados iniciais").Select txtbox_constante_catenaria_pos_rompimento.Text = Cells(102, 2).Text txtbox_constante_catenaria_pos_rompimento.Text = Format(txtbox_constante_catenaria_pos_rompimento, "#,##0.00") Sheets("Dados iniciais").Select txtbox_tracao_pos_rompimento.Text = Cells(101, 2).Text txtbox_tracao_pos_rompimento.Text = Format(txtbox_tracao_pos_rompimento, "#,##0.00") 'Exit Sub 'errorhandler: MsgBox ("Falta dado") End Sub Private Sub TextBox38_Change() If Not IsNumeric(txtbox_vao_7_re.Text) Then txtbox_vao_7_re.Text = "" Sheets("Dados iniciais").Select Cells(15, 3).Value = Me.txtbox_vao_7_re.Text End Sub Private Sub TextBox60_Change() Sheets("Dados iniciais").Select Me.txtbox_tracao_antes_rompimento.Text = Cells(92, 2).Value End Sub Private Sub TextBox64_Change() End Sub Private Sub TextBox9_Change() End Sub Private Sub txtbox_comprimento_cadeia_Change() Sheets("Isoladores").Select Cells(8, 4).Value = Me.txtbox_comprimento_cadeia.Text Sheets("Dados iniciais").Select End Sub Private Sub txtbox_estrutura_1_re_Change() If Not IsNumeric(txtbox_estrutura_1_re.Text) Then If txtbox_estrutura_1_re = "" Then txtbox_estrutura_1_re = "" Sheets("Dados iniciais").Select Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text Else txtbox_estrutura_1_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End If End Sub Private Sub txtbox_estrutura_1_vante_Change() If Not IsNumeric(txtbox_estrutura_1_vante.Text) Then If txtbox_estrutura_1_vante = "" Then txtbox_estrutura_1_vante = "" Sheets("Dados iniciais").Select Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text Else txtbox_estrutura_1_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End If End Sub Private Sub txtbox_estrutura_3_vante_Change() If Not IsNumeric(txtbox_estrutura_3_vante.Text) Then If txtbox_estrutura_3_vante = "" Then txtbox_estrutura_3_vante = "" Sheets("Dados iniciais").Select Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Else txtbox_estrutura_3_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text End If End Sub Private Sub txtbox_nome_ld_Change() Dim s As String Dim t As String If IsNumeric(txtbox_nome_ld.Text) Then txtbox_nome_ld.Text = "" End Sub Private Sub txtbox_peso_cadeia_Change() Sheets("Isoladores").Select Cells(9, 4).Value = Me.txtbox_peso_cadeia.Text Sheets("Dados iniciais").Select End Sub Private Sub txtbox_qtd_vaos_re_Change() Dim s As String s = txtbox_qtd_vaos_re.Text If IsNumeric(txtbox_qtd_vaos_re.Text) Then If (s > 7) Or (s < 0) Then txtbox_qtd_vaos_re.Text = "" MsgBox ("Entre somente com valores reais para até 7 vãos") End If Else If txtbox_qtd_vaos_re = "" Then txtbox_qtd_vaos_re = "" Else If txtbox_qtd_vaos_re = "-" Then txtbox_qtd_vaos_re = "" MsgBox ("Entre somente com valores positivos") Else txtbox_qtd_vaos_re = "" MsgBox ("Entre somente com valores numéricos") End If End If End If End Sub Private Sub txtbox_qtd_vaos_re_AfterUpdate() Call mostra_celulas_re Call mostra_vaos_re End Sub Private Sub txtbox_qtd_vaos_vante_Change() Dim s As String s = txtbox_qtd_vaos_vante.Text If IsNumeric(txtbox_qtd_vaos_vante.Text) Then If (s > 7) Or (s < 0) Then txtbox_qtd_vaos_vante.Text = "" MsgBox ("Entre somente com valores reais para até 7 vãos") End If Else If txtbox_qtd_vaos_vante = "" Then Else If txtbox_qtd_vaos_vante = "-" Then txtbox_qtd_vaos_vante = "" MsgBox ("Entre somente com valores positivos") Else txtbox_qtd_vaos_vante = "" MsgBox ("Entre somente com valores numéricos") End If End If End If End Sub Private Sub txtbox_qtd_vaos_vante_AfterUpdate() Call mostra_celulas_vante Call mostra_vaos_vante End Sub Private Sub txtbox_temperatura_operacao_Change() txtbox_informa_temperatura.Text = txtbox_temperatura_operacao.Text End Sub Private Sub txtbox_tracao_antes_rompimento_Change() If Not IsNumeric(txtbox_tracao_antes_rompimento.Text) Then txtbox_tracao_antes_rompimento.Text = "" Sheets("Dados iniciais").Select Cells(92, 2).Value = Me.txtbox_tracao_antes_rompimento.Text End Sub Private Sub txtbox_vao_1_re_Change() If Not IsNumeric(txtbox_vao_1_re.Text) Then If txtbox_vao_1_re = "" Then txtbox_vao_1_re = "" Sheets("Dados iniciais").Select Cells(21, 3).Value = 0 Else txtbox_vao_1_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(21, 3).Value = Me.txtbox_vao_1_re.Text End If End Sub Private Sub txtbox_vao_1_vante_Change() If Not IsNumeric(txtbox_vao_1_vante.Text) Then If txtbox_vao_1_vante = "" Then txtbox_vao_1_vante = "" Sheets("Dados iniciais").Select Cells(23, 3).Value = 0 Else txtbox_vao_1_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text End If End Sub Private Sub txtbox_vao_2_re_Change() If Not IsNumeric(txtbox_vao_2_re.Text) Then If txtbox_vao_2_re = "" Then txtbox_vao_2_re = "" Sheets("Dados iniciais").Select Cells(20, 3).Value = 0 Else txtbox_vao_2_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(20, 3).Value = Me.txtbox_vao_2_re.Text End If End Sub Private Sub txtbox_vao_2_vante_Change() If Not IsNumeric(txtbox_vao_2_vante.Text) Then If txtbox_vao_2_vante = "" Then txtbox_vao_2_vante = "" Sheets("Dados iniciais").Select Cells(24, 3).Value = 0 Else txtbox_vao_2_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text End If End Sub Private Sub txtbox_vao_3_re_Change() If Not IsNumeric(txtbox_vao_3_re.Text) Then If txtbox_vao_3_re = "" Then txtbox_vao_3_re = "" Sheets("Dados iniciais").Select Cells(19, 3).Value = 0 Else txtbox_vao_3_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(19, 3).Value = Me.txtbox_vao_3_re.Text End If End Sub Private Sub txtbox_vao_3_vante_Change() If Not IsNumeric(txtbox_vao_3_vante.Text) Then If txtbox_vao_3_vante = "" Then txtbox_vao_3_vante = "" Sheets("Dados iniciais").Select Cells(25, 3).Value = 0 Else txtbox_vao_3_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text End If End Sub Private Sub txtbox_vao_4_re_Change() If Not IsNumeric(txtbox_vao_4_re.Text) Then If txtbox_vao_4_re = "" Then txtbox_vao_4_re = "" Sheets("Dados iniciais").Select Cells(18, 3).Value = 0 Else txtbox_vao_4_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(18, 3).Value = Me.txtbox_vao_4_re.Text End If End Sub Private Sub txtbox_vao_4_vante_Change() If Not IsNumeric(txtbox_vao_4_vante.Text) Then If txtbox_vao_4_vante = "" Then txtbox_vao_4_vante = "" Sheets("Dados iniciais").Select Cells(26, 3).Value = 0 Else txtbox_vao_4_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(26, 3).Value = Me.txtbox_vao_4_vante.Text End If End Sub Private Sub txtbox_vao_5_re_Change() If Not IsNumeric(txtbox_vao_5_re.Text) Then If txtbox_vao_5_re = "" Then txtbox_vao_5_re = "" Sheets("Dados iniciais").Select Cells(17, 3).Value = 0 Else txtbox_vao_5_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(17, 3).Value = Me.txtbox_vao_5_re.Text End If End Sub Private Sub txtbox_vao_5_vante_Change() If Not IsNumeric(txtbox_vao_5_vante.Text) Then If txtbox_vao_5_vante = "" Then txtbox_vao_5_vante = "" Sheets("Dados iniciais").Select Cells(27, 3).Value = 0 Else txtbox_vao_5_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(27, 3).Value = Me.txtbox_vao_5_vante.Text End If End Sub Private Sub txtbox_vao_6_re_Change() If Not IsNumeric(txtbox_vao_6_re.Text) Then If txtbox_vao_6_re = "" Then txtbox_vao_6_re = "" Sheets("Dados iniciais").Select Cells(16, 3).Value = 0 Else txtbox_vao_6_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(16, 3).Value = Me.txtbox_vao_6_re.Text End If End Sub Private Sub txtbox_vao_6_vante_Change() If Not IsNumeric(txtbox_vao_6_vante.Text) Then If txtbox_vao_6_vante = "" Then txtbox_vao_6_vante = "" Sheets("Dados iniciais").Select Cells(28, 3).Value = 0 Else txtbox_vao_6_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(28, 3).Value = Me.txtbox_vao_6_vante.Text End If End Sub Private Sub txtbox_vao_7_re_Change() If Not IsNumeric(txtbox_vao_7_re.Text) Then If txtbox_vao_7_re = "" Then txtbox_vao_7_re = "" Sheets("Dados iniciais").Select Cells(15, 3).Value = 0 Else txtbox_vao_7_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(15, 3).Value = Me.txtbox_vao_7_re.Text End If End Sub Private Sub txtbox_vao_7_vante_Change() If Not IsNumeric(txtbox_vao_7_vante.Text) Then If txtbox_vao_7_vante = "" Then txtbox_vao_7_vante = "" Sheets("Dados iniciais").Select Cells(29, 3).Value = 0 Else txtbox_vao_7_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(29, 3).Value = Me.txtbox_vao_7_vante.Text End If End Sub Private Sub txtbox_vao_analise_Change() txtbox_vao_1_re.Text = txtbox_vao_analise.Text txtbox_vao_1_vante.Text = txtbox_vao_analise.Text End Sub Private Sub UserForm1_Initialize() Dim rng As Range Dim ws As Worksheet Dim i As Integer Call maximiza_tela Cbo_Tensao.Clear 'limpa o combo box alvo Set ws = Worksheets("Isoladores") 'planilha que está os dados 'loop pelos itens da lista que voce criou For Each rng In ws.Range("Tensao_kV") Me.Cbo_Tensao.AddItem rng.Value Next rng Cbo_Isolador_Tipo.Clear 'limpa o combo box alvo Set ws = Worksheets("Isoladores") 'planilha que está os dados 'loop pelos itens da lista que voce criou For Each rng In ws.Range("isoladores_tipo") Me.Cbo_Isolador_Tipo.AddItem rng.Value Next rng Cbo_Condutor.Clear 'limpa o combo box alvo Set ws = Worksheets("Condutor") 'planilha que está os dados 'loop pelos itens da lista que voce criou For Each rng In ws.Range("Condutores") Me.Cbo_Condutor.AddItem rng.Value Next rng Call oculta_dados_vaos_rompidos Call trava_txt_box Call zera_celulas End Sub Sub mostra_peso_cadeia() If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Vidro") Then txtbox_peso_cadeia.Text = "23,05" Else If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Porcelana") Then txtbox_peso_cadeia.Text = "23,05" Else If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Polimérico") Then txtbox_peso_cadeia.Text = "5,00" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Vidro") Then txtbox_peso_cadeia.Text = "39,05" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Porcelana") Then txtbox_peso_cadeia.Text = "39,05" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Polimérico") Then txtbox_peso_cadeia.Text = "5,00" Else txtbox_peso_cadeia.Text = "" End If End If End If End If End If End If End Sub Sub mostra_comprimento_cadeia() If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Vidro") Then txtbox_comprimento_cadeia.Text = "1,07" Else If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Porcelana") Then txtbox_comprimento_cadeia.Text = "1,07" Else If (Cbo_Tensao.Value = " 69") And (Cbo_Isolador_Tipo.Value = "Polimérico") Then txtbox_comprimento_cadeia.Text = "1,07" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Vidro") Then txtbox_comprimento_cadeia.Text = "1,65" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Porcelana") Then txtbox_comprimento_cadeia.Text = "1,65" Else If (Cbo_Tensao.Value = "138") And (Cbo_Isolador_Tipo.Value = "Polimérico") Then txtbox_comprimento_cadeia.Text = "1,65" Else txtbox_comprimento_cadeia.Text = "" End If End If End If End If End If End If End Sub Sub zera_celulas() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 1 Do While j <= 15 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 1 Do While j <= 15 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop Cells(92, 2).Value = 0 End Sub Sub zera_celulas_re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i - 1 j = j + 1 Loop i = 49 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i - 1 j = j + 1 Loop End Sub Private Sub txtbox_estrutura_2_re_Change() If Not IsNumeric(txtbox_estrutura_2_re.Text) Then If txtbox_estrutura_2_re = "" Then txtbox_estrutura_2_re = "" Sheets("Dados iniciais").Select Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Else txtbox_estrutura_2_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text End If End Sub Private Sub txtbox_estrutura_2_vante_Change() If Not IsNumeric(txtbox_estrutura_2_vante.Text) Then If txtbox_estrutura_2_vante = "" Then txtbox_estrutura_2_vante = "" Sheets("Dados iniciais").Select Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Else txtbox_estrutura_2_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text End If End Sub Private Sub txtbox_estrutura_3_re_Change() If Not IsNumeric(txtbox_estrutura_3_re.Text) Then If txtbox_estrutura_3_re = "" Then txtbox_estrutura_3_re = "" Sheets("Dados iniciais").Select Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Else txtbox_estrutura_3_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text End If End Sub Private Sub txtbox_estrutura_4_re_Change() If Not IsNumeric(txtbox_estrutura_4_re.Text) Then If txtbox_estrutura_4_re = "" Then txtbox_estrutura_4_re = "" Sheets("Dados iniciais").Select Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text Else txtbox_estrutura_4_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text End If End Sub Private Sub txtbox_estrutura_4_vante_Change() If Not IsNumeric(txtbox_estrutura_4_vante.Text) Then If txtbox_estrutura_4_vante = "" Then txtbox_estrutura_4_vante = "" Sheets("Dados iniciais").Select Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text Else txtbox_estrutura_4_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text End If End Sub Private Sub txtbox_estrutura_5_re_Change() If Not IsNumeric(txtbox_estrutura_5_re.Text) Then If txtbox_estrutura_5_re = "" Then txtbox_estrutura_5_re = "" Sheets("Dados iniciais").Select Cells(37, 3).Value = Me.txtbox_estrutura_5_re.Text Else txtbox_estrutura_5_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(37, 3).Value = Me.txtbox_estrutura_5_re.Text End If End Sub Private Sub txtbox_estrutura_5_vante_Change() If Not IsNumeric(txtbox_estrutura_5_vante.Text) Then If txtbox_estrutura_5_vante = "" Then txtbox_estrutura_5_vante = "" Sheets("Dados iniciais").Select Cells(47, 3).Value = Me.txtbox_estrutura_5_vante.Text Else txtbox_estrutura_5_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(47, 3).Value = Me.txtbox_estrutura_5_vante.Text End If End Sub Private Sub txtbox_estrutura_6_re_Change() If Not IsNumeric(txtbox_estrutura_6_re.Text) Then If txtbox_estrutura_6_re = "" Then txtbox_estrutura_6_re = "" Sheets("Dados iniciais").Select Cells(36, 3).Value = Me.txtbox_estrutura_6_re.Text Else txtbox_estrutura_6_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(36, 3).Value = Me.txtbox_estrutura_6_re.Text End If End Sub Private Sub txtbox_estrutura_6_vante_Change() If Not IsNumeric(txtbox_estrutura_6_vante.Text) Then If txtbox_estrutura_6_vante = "" Then txtbox_estrutura_6_vante = "" Sheets("Dados iniciais").Select Cells(48, 3).Value = Me.txtbox_estrutura_6_vante.Text Else txtbox_estrutura_6_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(48, 3).Value = Me.txtbox_estrutura_6_vante.Text End If End Sub Private Sub txtbox_estrutura_7_re_Change() If Not IsNumeric(txtbox_estrutura_7_re.Text) Then If txtbox_estrutura_7_re = "" Then txtbox_estrutura_7_re = "" Sheets("Dados iniciais").Select Cells(35, 3).Value = Me.txtbox_estrutura_7_re.Text Else txtbox_estrutura_7_re = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(35, 3).Value = Me.txtbox_estrutura_7_re.Text End If End Sub Private Sub txtbox_estrutura_7_vante_Change() If Not IsNumeric(txtbox_estrutura_7_vante.Text) Then If txtbox_estrutura_7_vante = "" Then txtbox_estrutura_7_vante = "" Sheets("Dados iniciais").Select Cells(49, 3).Value = Me.txtbox_estrutura_7_vante.Text Else txtbox_estrutura_7_vante = "" MsgBox ("Entre somente com valores numéricos") End If Else Sheets("Dados iniciais").Select Cells(49, 3).Value = Me.txtbox_estrutura_7_vante.Text End If End Sub Private Sub txtbox_nome_ld_AfterUpdate() Dim s As String Dim ld As String ld = Left(txtbox_nome_ld.Text, 3) If ld = "LD " Then Else s = "LD " txtbox_nome_ld.Text = s & txtbox_nome_ld.Text End If ld = Right(txtbox_nome_ld.Text, 2) If ld = "kV" Then Else If Cbo_Tensao.Text = "" Then Else txtbox_nome_ld = txtbox_nome_ld.Text & ", " & Cbo_Tensao.Text & " kV" End If End If End Sub Private Sub UserForm1_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True Call CMD_Cancel_Click End If End Sub Private Sub CMD_Cancel_Click() If MsgBox(prompt:=" Você deseja realmente sair?", Buttons:=vbOKCancel) = vbOK Then ActiveWorkbook.Save Application.Quit End If End Sub Sub mostra_vaos_re() Dim vaos_re As String Call oculta_dados_vaos_rompidos_re vaos_re = txtbox_qtd_vaos_re.Text If vaos_re = "" Then Else If vaos_re = 0 Then Else If vaos_re = 1 Then txtbox_vao_1_re.Visible = True txtbox_estrutura_1_re.Visible = True lab_vao_1re.Visible = True lab_estrutura_1re.Visible = True Else If vaos_re = 2 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True Else If vaos_re = 3 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_vao_3_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True txtbox_estrutura_3_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_vao_3re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True lab_estrutura_3re.Visible = True Else If vaos_re = 4 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_vao_3_re.Visible = True txtbox_vao_4_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True txtbox_estrutura_3_re.Visible = True txtbox_estrutura_4_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_vao_3re.Visible = True lab_vao_4re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True lab_estrutura_3re.Visible = True lab_estrutura_4re.Visible = True Else If vaos_re = 5 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_vao_3_re.Visible = True txtbox_vao_4_re.Visible = True txtbox_vao_5_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True txtbox_estrutura_3_re.Visible = True txtbox_estrutura_4_re.Visible = True txtbox_estrutura_5_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_vao_3re.Visible = True lab_vao_4re.Visible = True lab_vao_5re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True lab_estrutura_3re.Visible = True lab_estrutura_4re.Visible = True lab_estrutura_5re.Visible = True Else If vaos_re = 6 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_vao_3_re.Visible = True txtbox_vao_4_re.Visible = True txtbox_vao_5_re.Visible = True txtbox_vao_6_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True txtbox_estrutura_3_re.Visible = True txtbox_estrutura_4_re.Visible = True txtbox_estrutura_5_re.Visible = True txtbox_estrutura_6_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_vao_3re.Visible = True lab_vao_4re.Visible = True lab_vao_5re.Visible = True lab_vao_6re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True lab_estrutura_3re.Visible = True lab_estrutura_4re.Visible = True lab_estrutura_5re.Visible = True lab_estrutura_6re.Visible = True Else If vaos_re = 7 Then txtbox_vao_1_re.Visible = True txtbox_vao_2_re.Visible = True txtbox_vao_3_re.Visible = True txtbox_vao_4_re.Visible = True txtbox_vao_5_re.Visible = True txtbox_vao_6_re.Visible = True txtbox_vao_7_re.Visible = True txtbox_estrutura_1_re.Visible = True txtbox_estrutura_2_re.Visible = True txtbox_estrutura_3_re.Visible = True txtbox_estrutura_4_re.Visible = True txtbox_estrutura_5_re.Visible = True txtbox_estrutura_6_re.Visible = True txtbox_estrutura_7_re.Visible = True lab_vao_1re.Visible = True lab_vao_2re.Visible = True lab_vao_3re.Visible = True lab_vao_4re.Visible = True lab_vao_5re.Visible = True lab_vao_6re.Visible = True lab_vao_7re.Visible = True lab_estrutura_1re.Visible = True lab_estrutura_2re.Visible = True lab_estrutura_3re.Visible = True lab_estrutura_4re.Visible = True lab_estrutura_5re.Visible = True lab_estrutura_6re.Visible = True lab_estrutura_7re.Visible = True End If End If End If End If End If End If End If End If End If End Sub Sub mostra_vaos_vante() Dim vaos_vante As String Call oculta_dados_vaos_rompidos_vante vaos_vante = txtbox_qtd_vaos_vante.Text If vaos_vante = "" Then Else If vaos_vante = 0 Then Else If vaos_vante = 1 Then txtbox_vao_1_vante.Visible = True txtbox_estrutura_1_vante.Visible = True lab_vao_1vante.Visible = True lab_estrutura_1vante.Visible = True Else If vaos_vante = 2 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True Else If vaos_vante = 3 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_vao_3_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True txtbox_estrutura_3_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_vao_3vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True lab_estrutura_3vante.Visible = True Else If vaos_vante = 4 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_vao_3_vante.Visible = True txtbox_vao_4_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True txtbox_estrutura_3_vante.Visible = True txtbox_estrutura_4_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_vao_3vante.Visible = True lab_vao_4vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True lab_estrutura_3vante.Visible = True lab_estrutura_4vante.Visible = True Else If vaos_vante = 5 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_vao_3_vante.Visible = True txtbox_vao_4_vante.Visible = True txtbox_vao_5_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True txtbox_estrutura_3_vante.Visible = True txtbox_estrutura_4_vante.Visible = True txtbox_estrutura_5_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_vao_3vante.Visible = True lab_vao_4vante.Visible = True lab_vao_5vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True lab_estrutura_3vante.Visible = True lab_estrutura_4vante.Visible = True lab_estrutura_5vante.Visible = True Else If vaos_vante = 6 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_vao_3_vante.Visible = True txtbox_vao_4_vante.Visible = True txtbox_vao_5_vante.Visible = True txtbox_vao_6_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True txtbox_estrutura_3_vante.Visible = True txtbox_estrutura_4_vante.Visible = True txtbox_estrutura_5_vante.Visible = True txtbox_estrutura_6_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_vao_3vante.Visible = True lab_vao_4vante.Visible = True lab_vao_5vante.Visible = True lab_vao_6vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True lab_estrutura_3vante.Visible = True lab_estrutura_4vante.Visible = True lab_estrutura_5vante.Visible = True lab_estrutura_6vante.Visible = True Else If vaos_vante = 7 Then txtbox_vao_1_vante.Visible = True txtbox_vao_2_vante.Visible = True txtbox_vao_3_vante.Visible = True txtbox_vao_4_vante.Visible = True txtbox_vao_5_vante.Visible = True txtbox_vao_6_vante.Visible = True txtbox_vao_7_vante.Visible = True txtbox_estrutura_1_vante.Visible = True txtbox_estrutura_2_vante.Visible = True txtbox_estrutura_3_vante.Visible = True txtbox_estrutura_4_vante.Visible = True txtbox_estrutura_5_vante.Visible = True txtbox_estrutura_6_vante.Visible = True txtbox_estrutura_7_vante.Visible = True lab_vao_1vante.Visible = True lab_vao_2vante.Visible = True lab_vao_3vante.Visible = True lab_vao_4vante.Visible = True lab_vao_5vante.Visible = True lab_vao_6vante.Visible = True lab_vao_7vante.Visible = True lab_estrutura_1vante.Visible = True lab_estrutura_2vante.Visible = True lab_estrutura_3vante.Visible = True lab_estrutura_4vante.Visible = True lab_estrutura_5vante.Visible = True lab_estrutura_6vante.Visible = True lab_estrutura_7vante.Visible = True End If End If End If End If End If End If End If End If End If End Sub Sub zera_celulas_1re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 7 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 7 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_2re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 6 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 6 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_3re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 5 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 5 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_4re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 4 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 4 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_5re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 3 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 3 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_6re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 2 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 2 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_7re() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 15 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop i = 35 j = 1 Do While j <= 7 Cells(i, 3).Value = 0 i = i + 1 j = j + 1 Loop End Sub Sub zera_celulas_1vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 0 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 0 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_2vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 1 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 1 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_3vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 2 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 2 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_4vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 3 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 3 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_5vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 4 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 4 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_6vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 5 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 5 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub zera_celulas_7vante() Dim i As Integer Dim j As Integer Sheets("Dados iniciais").Select i = 29 j = 6 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop i = 49 j = 6 Do While j >= 0 Cells(i, 3).Value = 0 i = i - 1 j = j - 1 Loop End Sub Sub mostra_celulas_7re() Sheets("Dados iniciais").Select Cells(15, 3).Value = Me.txtbox_vao_7_re.Text Cells(16, 3).Value = Me.txtbox_vao_6_re.Text Cells(17, 3).Value = Me.txtbox_vao_5_re.Text Cells(18, 3).Value = Me.txtbox_vao_4_re.Text Cells(19, 3).Value = Me.txtbox_vao_3_re.Text Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(35, 3).Value = Me.txtbox_estrutura_7_re.Text Cells(36, 3).Value = Me.txtbox_estrutura_6_re.Text Cells(37, 3).Value = Me.txtbox_estrutura_5_re.Text Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_6re() Sheets("Dados iniciais").Select Cells(16, 3).Value = Me.txtbox_vao_6_re.Text Cells(17, 3).Value = Me.txtbox_vao_5_re.Text Cells(18, 3).Value = Me.txtbox_vao_4_re.Text Cells(19, 3).Value = Me.txtbox_vao_3_re.Text Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(36, 3).Value = Me.txtbox_estrutura_6_re.Text Cells(37, 3).Value = Me.txtbox_estrutura_5_re.Text Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_5re() Sheets("Dados iniciais").Select Cells(17, 3).Value = Me.txtbox_vao_5_re.Text Cells(18, 3).Value = Me.txtbox_vao_4_re.Text Cells(19, 3).Value = Me.txtbox_vao_3_re.Text Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(37, 3).Value = Me.txtbox_estrutura_5_re.Text Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_4re() Sheets("Dados iniciais").Select Cells(18, 3).Value = Me.txtbox_vao_4_re.Text Cells(19, 3).Value = Me.txtbox_vao_3_re.Text Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(38, 3).Value = Me.txtbox_estrutura_4_re.Text Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_3re() Sheets("Dados iniciais").Select Cells(19, 3).Value = Me.txtbox_vao_3_re.Text Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(39, 3).Value = Me.txtbox_estrutura_3_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_2re() Sheets("Dados iniciais").Select Cells(20, 3).Value = Me.txtbox_vao_2_re.Text Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(40, 3).Value = Me.txtbox_estrutura_2_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_1re() Sheets("Dados iniciais").Select Cells(21, 3).Value = Me.txtbox_vao_1_re.Text Cells(41, 3).Value = Me.txtbox_estrutura_1_re.Text End Sub Sub mostra_celulas_7vante() Sheets("Dados iniciais").Select Cells(29, 3).Value = Me.txtbox_vao_7_vante.Text Cells(28, 3).Value = Me.txtbox_vao_6_vante.Text Cells(27, 3).Value = Me.txtbox_vao_5_vante.Text Cells(26, 3).Value = Me.txtbox_vao_4_vante.Text Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(49, 3).Value = Me.txtbox_estrutura_7_vante.Text Cells(48, 3).Value = Me.txtbox_estrutura_6_vante.Text Cells(47, 3).Value = Me.txtbox_estrutura_5_vante.Text Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_6vante() Sheets("Dados iniciais").Select Cells(28, 3).Value = Me.txtbox_vao_6_vante.Text Cells(27, 3).Value = Me.txtbox_vao_5_vante.Text Cells(26, 3).Value = Me.txtbox_vao_4_vante.Text Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(48, 3).Value = Me.txtbox_estrutura_6_vante.Text Cells(47, 3).Value = Me.txtbox_estrutura_5_vante.Text Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_5vante() Sheets("Dados iniciais").Select Cells(27, 3).Value = Me.txtbox_vao_5_vante.Text Cells(26, 3).Value = Me.txtbox_vao_4_vante.Text Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(47, 3).Value = Me.txtbox_estrutura_5_vante.Text Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_4vante() Sheets("Dados iniciais").Select Cells(26, 3).Value = Me.txtbox_vao_4_vante.Text Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(46, 3).Value = Me.txtbox_estrutura_4_vante.Text Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_3vante() Sheets("Dados iniciais").Select Cells(25, 3).Value = Me.txtbox_vao_3_vante.Text Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(45, 3).Value = Me.txtbox_estrutura_3_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_2vante() Sheets("Dados iniciais").Select Cells(24, 3).Value = Me.txtbox_vao_2_vante.Text Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(44, 3).Value = Me.txtbox_estrutura_2_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub mostra_celulas_1vante() Sheets("Dados iniciais").Select Cells(23, 3).Value = Me.txtbox_vao_1_vante.Text Cells(43, 3).Value = Me.txtbox_estrutura_1_vante.Text End Sub Sub maximiza_tela() Application.WindowState = xlMaximized Me.Height = Application.Height Me.Width = Application.Width Me.Left = Application.Left Me.Top = Application.Top End Sub Sub oculta_dados_vaos_rompidos_re() txtbox_vao_7_re.Visible = False txtbox_vao_6_re.Visible = False txtbox_vao_5_re.Visible = False txtbox_vao_4_re.Visible = False txtbox_vao_3_re.Visible = False txtbox_vao_2_re.Visible = False txtbox_vao_1_re.Visible = False txtbox_estrutura_7_re.Visible = False txtbox_estrutura_6_re.Visible = False txtbox_estrutura_5_re.Visible = False txtbox_estrutura_4_re.Visible = False txtbox_estrutura_3_re.Visible = False txtbox_estrutura_2_re.Visible = False txtbox_estrutura_1_re.Visible = False lab_vao_7re.Visible = False lab_vao_6re.Visible = False lab_vao_5re.Visible = False lab_vao_4re.Visible = False lab_vao_3re.Visible = False lab_vao_2re.Visible = False lab_vao_1re.Visible = False lab_estrutura_7re.Visible = False lab_estrutura_6re.Visible = False lab_estrutura_5re.Visible = False lab_estrutura_4re.Visible = False lab_estrutura_3re.Visible = False lab_estrutura_2re.Visible = False lab_estrutura_1re.Visible = False End Sub Sub oculta_dados_vaos_rompidos_vante() txtbox_vao_7_vante.Visible = False txtbox_vao_6_vante.Visible = False txtbox_vao_5_vante.Visible = False txtbox_vao_4_vante.Visible = False txtbox_vao_3_vante.Visible = False txtbox_vao_2_vante.Visible = False txtbox_vao_1_vante.Visible = False txtbox_estrutura_7_vante.Visible = False txtbox_estrutura_6_vante.Visible = False txtbox_estrutura_5_vante.Visible = False txtbox_estrutura_4_vante.Visible = False txtbox_estrutura_3_vante.Visible = False txtbox_estrutura_2_vante.Visible = False txtbox_estrutura_1_vante.Visible = False lab_vao_7vante.Visible = False lab_vao_6vante.Visible = False lab_vao_5vante.Visible = False lab_vao_4vante.Visible = False lab_vao_3vante.Visible = False lab_vao_2vante.Visible = False lab_vao_1vante.Visible = False lab_estrutura_7vante.Visible = False lab_estrutura_6vante.Visible = False lab_estrutura_5vante.Visible = False lab_estrutura_4vante.Visible = False lab_estrutura_3vante.Visible = False lab_estrutura_2vante.Visible = False lab_estrutura_1vante.Visible = False End Sub Sub oculta_dados_vaos_rompidos() txtbox_vao_7_re.Visible = False txtbox_vao_6_re.Visible = False txtbox_vao_5_re.Visible = False txtbox_vao_4_re.Visible = False txtbox_vao_3_re.Visible = False txtbox_vao_2_re.Visible = False txtbox_vao_1_re.Visible = False txtbox_estrutura_7_re.Visible = False txtbox_estrutura_6_re.Visible = False txtbox_estrutura_5_re.Visible = False txtbox_estrutura_4_re.Visible = False txtbox_estrutura_3_re.Visible = False txtbox_estrutura_2_re.Visible = False txtbox_estrutura_1_re.Visible = False lab_vao_7re.Visible = False lab_vao_6re.Visible = False lab_vao_5re.Visible = False lab_vao_4re.Visible = False lab_vao_3re.Visible = False lab_vao_2re.Visible = False lab_vao_1re.Visible = False lab_estrutura_7re.Visible = False lab_estrutura_6re.Visible = False lab_estrutura_5re.Visible = False lab_estrutura_4re.Visible = False lab_estrutura_3re.Visible = False lab_estrutura_2re.Visible = False lab_estrutura_1re.Visible = False txtbox_vao_7_vante.Visible = False txtbox_vao_6_vante.Visible = False txtbox_vao_5_vante.Visible = False txtbox_vao_4_vante.Visible = False txtbox_vao_3_vante.Visible = False txtbox_vao_2_vante.Visible = False txtbox_vao_1_vante.Visible = False txtbox_estrutura_7_vante.Visible = False txtbox_estrutura_6_vante.Visible = False txtbox_estrutura_5_vante.Visible = False txtbox_estrutura_4_vante.Visible = False txtbox_estrutura_3_vante.Visible = False txtbox_estrutura_2_vante.Visible = False txtbox_estrutura_1_vante.Visible = False lab_vao_7vante.Visible = False lab_vao_6vante.Visible = False lab_vao_5vante.Visible = False lab_vao_4vante.Visible = False lab_vao_3vante.Visible = False lab_vao_2vante.Visible = False lab_vao_1vante.Visible = False lab_estrutura_7vante.Visible = False lab_estrutura_6vante.Visible = False lab_estrutura_5vante.Visible = False lab_estrutura_4vante.Visible = False lab_estrutura_3vante.Visible = False lab_estrutura_2vante.Visible = False lab_estrutura_1vante.Visible = False End Sub 'trava as texbox, impedindo que o usuário entre com dados nas mesmas Sub trava_txt_box() Me.txtbox_constante_catenaria_pos_rompimento.Enabled = False Me.txtbox_tracao_pos_rompimento.Enabled = False Me.txtbox_informa_temperatura.Enabled = False End Sub Sub mostra_celulas_re() Dim celulas_re As String Call zera_celulas_re celulas_re = txtbox_qtd_vaos_re.Text If celulas_re = "" Then Else If celulas_re = 0 Then Else If celulas_re = 1 Then Call mostra_celulas_1re Else If celulas_re = 2 Then Call mostra_celulas_2re Else If celulas_re = 3 Then Call mostra_celulas_3re Else If celulas_re = 4 Then Call mostra_celulas_4re Else If celulas_re = 5 Then Call mostra_celulas_5re Else If celulas_re = 6 Then Call mostra_celulas_6re Else If celulas_re = 7 Then Call mostra_celulas_7re End If End If End If End If End If End If End If End If End If End Sub Sub mostra_celulas_vante() Dim celulas_vante As String Call zera_celulas_vante celulas_vante = txtbox_qtd_vaos_vante.Text If celulas_vante = "" Then Else If celulas_vante = 0 Then Else If celulas_vante = 1 Then Call mostra_celulas_1vante Else If celulas_vante = 2 Then Call mostra_celulas_2vante Else If celulas_vante = 3 Then Call mostra_celulas_3vante Else If celulas_vante = 4 Then Call mostra_celulas_4vante Else If celulas_vante = 5 Then Call mostra_celulas_5vante Else If celulas_vante = 6 Then Call mostra_celulas_6vante Else If celulas_vante = 7 Then Call mostra_celulas_7vante End If End If End If End If End If End If End If End If End If End Sub Private Sub UserForm_Click() End Sub Trata-se de um programa que estou desenvolvendo para abaixamento de cabos em LTs.
  18. gente urgente preciso de ajuda para criar uma galeria para um site eu to me batendo todo porque não existem videos novos e não encontro absolutamente ninguém para me da uma ajuda alguém por favor pode me ajudar de bom grado já não sei mas oque fazer to tentando uma galeria de um video aqui to fazendo tudo certinho e dá erro aii queria ajuda de alguém experiente se poder ajudar manda facebook ou me adc no meu que e avisa que é desse forum pra eu poder explicar nelhor https://www.facebook.com/jhonny.neryy
  19. Estou tentando criar um campo como em um site que estou montando, mas na hora em que vai visualizar ele não obedece oque foi posto no código ficando somente o "TEXTO" com a formatação "h3". Como resolver?
  20. Bom tenho um form, mais não sei identificar o erro, quando o php abstrai os dados do html ele apenas envia para meu email o campo email prenchido o resto fica assim: Nome: E-mail: fabioguelfiunix@gmail.com Telefone: Mensagem: Gostaria de uma ajuda Whatsapp 11 956472141 Skype fabioguelfiunix@gmail.com Trecho html: <div id="content" class="pageContato"> <div class="row"> <div class="small-12 large-5 columns"> <dl class="tabs title support"> <dd class="active"><a href="#contato">CONTATO</a></dd> <!-- <dd><a href="#suporte">SUPORTE</a></dd> --> </dl> <div class="sep"></div> <ul class="tabs-content"> <li class="active" id="contatoTab"> <form id="form-contato" action="envia_contato.php" method="POST" class="form-contato"> <label for="name">Nome<span class="required">*</span></label> <input type="text" id="name" name="name" class="required" value=""/> <span class="error" for="name"> </span> <label for="email">Email<span class="required">*</span></label> <input type="email" name="email" id="email" class="required" value=""/> <span class="error" for="email"> </span> <label for="phone">Telefone<span class="required">*</span></label> <input type="text" name="phone" id="phone" class="required" value=""/> <span class="error" for="phone"> </span> <label for="subject">Assunto<span class="required">*</span></label> <input type="text" name="subject" id="subject" class="required" value=""/> <span class="error" for="subject"> </span> <label for="message">Mensagem<span class="required">*</span></label> <textarea name="message" id="message" cols="30" rows="10" class="required"></textarea> <span class="error" for="message"> </span> <label for="input-captcha">Digite o texto abaixo<span class="required">*</span></label> <img id="captcha" src="captcha/captcha.png" alt="" /> <input type="text" name="Captcha" id="input-captcha" class="required input-captcha" value="" /><br><br> <button class="radius alert button button-submit ">Enviar</button> </form> </li> </ul> </div> Trecho Php: <html> <head> <title>Enviando e-mail...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="refresh" content="01;URL=http://agenciaguelfi.com.br/index.html"> </head> <body> <?php $subject = $_POST['assunto']; $name = $_POST['nome']; $email = $_POST['email']; $phone = $_POST['telefone']; $message = $_POST['observacoes']; ?> <?php $header = "Content-Type: text/html; charset= utf-8"; $to = "contato@agenciaguelfi.com.br,fabioguelfiunix@gmail.com"; $message = "Nome: $name E-mail: $email Telefone: $phone Mensagem: $message "; mail($to,$subject,$message); echo"Mensagem <strong>enviada</strong> </br></br> <strong>Entraremos em contato em breve!</strong>"; ?> </body> </html>
  21. Olá pessoal, meu sistema de postagens está dando o erro Call to a member function prepare() on null na linha 54. Alguém sabe como resolver? Segue abaixo o código. <!DOCTYPE> <?php include_once '_php/BD.class.php'; global $conn; ?> <html> <head> <title>Postagens</title> </head> <body> <?php ini_set('display_errors', true); error_reporting(E_ALL); ?> <form name="entrar" method="post" action="#"> <label> <textarea type="text"name="texto" cols="22" rows="6" id="textoPostagem"></textarea> </label> <br/> <input type="submit" name="postar" value="Postar"> <br/> </form> <form method="post" action="_php/recebe_upload.php" enctype="multipart/form-data"> <label>Arquivo</label> <input type="file" name="arquivo" /> <input type="submit" value="Enviar" /> </form> <?php ?> <?php if(isset($_POST['postar']) && empty($_POST['textoPostagem'])){ $post = $_POST['texto']; $data = date("Y/m/d"); if (strlen($_POST['texto'])) { //$sql = "INSERT INTO mydb (postagens) VALUES('$post')"; $sql = $conn->prepare("insert into mydb (postagens) values ('$post')"); $sql->bind_param(1, $post); $sql->execute() or exit(print_r($sql->errorInfo(), true));; $stmt2 = $conn->prepare("select postagens from postagens"); $stmt2->execute(); while ($stmt2->fetch(PDO::FETCH_OBJ)) { /* ($exibir = mysqli_fetch_array($executar)) echo $exibir['texto']; echo " "; */ $nome=$reg->nome; echo $nome; echo $reg->texto; echo $date; } } } else { echo "Digite um texto"; } </body> </html> Código da conexão com BD <?php class BD{ private static $conn; static function getConn(){ if (is_null (self::$conn)) { self::$conn = new PDO('mysql:host=localhost;dbname=mydb','root',''); } return self::$conn; } } ?> Agradeço desde já a ajuda.
  22. Olá a todos!! :D Estou fazendo um veículo para UnrealScript da Unreal Engine 1 (mais especificamente, Unreal Tournament v436) que FUNCIONE. Porém o seguinte erro surge: Error in UT99Vehicle, line 155: 'state': expecting State, got Function Esse é o código inteiro: //============================================================================= // UT99Vehicle. //============================================================================= class UT99Vehicle expands Pickup; var(Vehicle) Vector DriverOffset; var(Vehicle) Vector PassengerOffsets[63]; var(Vehicle) float TopSpeed; var(Vehicle) float VehicleHealth; var byte PeopleInside; var Pawn PassengerPawns[63]; var Pawn DriverPawn; var(Vehicle) bool bTeamGame; var(Vehicle) float ActorBumpForce; var(Vehicle) int MyTeam; var(Vehicle) bool bSetTeamToDriverTeam; var(Vehicle) int PawnBumpDamage; var(Vehicle) float Weight; var(Vehicle) string KillMessage[3]; var(Vehicle) int MaxPassengers; var(Vehicle) float RespawnTime; var(Vehicle) Texture DestroyedTexture; var Texture OldTexture; simulated function TakeDamage(int Health, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType) { if ( DamageType != 'AntiVehicle' ) self.Velocity += Momentum / (Weight / 2); else self.Velocity += Momentum / Weight; } simulated function Touch(Actor Other) { if ( Other.IsA(class'Pawn'.Name) &amp;&amp; PeopleInside &gt; 1 ) { if ( ( Level.Game.IsA(class'TeamGamePlus'.Name) &amp;&amp; ( ( !bSetTeamToDriverTeam &amp;&amp; Pawn(Other).PlayerReplicationInfo.Team == MyTeam ) ^^ ( bSetTeamToDriverTeam &amp;&amp; Pawn(Other).PlayerReplicationInfo.Team == DriverPawn.PlayerReplicationInfo.Team ) ) ) &amp;&amp; Pawn(Other).PlayerReplicationInfo.Team != 255 &amp;&amp; PeopleInside &lt;= MaxPassengers ) { PassengerPawns[PeopleInside - 1] = Pawn(Other); PeopleInside++; } else { Other.TakeDamage(PawnBumpDamage, DriverPawn, Location, Velocity, 'vehiclebump'); Other.Velocity = (Other.Location - Location) * ActorBumpForce; if ( Pawn(Other).Health &lt; 1 ) { Pawn(Other).GoToState('Dying'); BroadcastMessage(KillMessage[0] @ DriverPawn.Name @ KillMessage[1] @ Pawn(Other).Name @ KillMessage[2]); } } } else if ( Other.IsA(class'Projectile'.Name) ) { Projectile(Other).ProcessTouch(self, self.Location); } else if ( Other.bBlockActors ) Other.Velocity = (Other.Location - Location) * ActorBumpForce; } simulated function AdjustMotion(vector OldLocation, pawn Driver) { if ( VSize(OldLocation - Location) &gt; TopSpeed ) { return Normal(OldLocation - Location) * TopSpeed; } } simulated function LeaveVehicle(byte Index) { local int i; if ( Index == 0 ) { DriverPawn == None; PeopleInside--; for (i = 0; i &lt; 64; i++) if ( PassengerPawns[i] != None ) PassengerPawns[i] == None; } elif ( Index &lt; 64 ) { for ( i = Index--; i &lt; 63; i++ ) { if ( PassengerPawns[i++] != None ) PassengerPawns[i] = PassengerPawns[i++]; else return; } } } function PickupFunction(Pawn Other) { if ( IsInState('Destroyed') || IsInState('Activated') ) return; DriverPawn = Other; PeopleInside++; GoToState('Activated'); } simulated function Tick(float TimeDelta) { local vector OldLocation; local int i; if ( PeopleInside &lt; 1 || !IsInState('Activated') ) return; if ( VehicleHealth &lt; 1 ) { Spawn(class'ExplosionChain', self, Location + (BlastOffset * (VRand() * 2 ))).Trigger(self, DriverPawn); GoToState('Destroyed') } OldLocation = Location; if ( DriverPawn != None ) { Self.Location = DriverPawn.Location - DriverOffset; } Move(AdjustMotion(OldLocation, DriverPawn)) DriverPawn.SetLocation(Location + DriverOffset); for ( i = 0; i &lt; 64; i++ ) if ( PassengerPawns[i] != None ) { PassengerPawns[í].SetLocation(Location + PassengerOffsets[i]); } } State() Destroyed { function TakeDamage(); function Tick(); function LeaveVehicle(); function PickupFunction(); function Touch(); simulated function BeginState() { OldTexture = Texture; Texture = DestroyedTexture; Super.Sleep(RespawnTime); Texture = OldTexture GoToState(InitialState); } } EDIT: Nossa, o resto do texto foi trincado :/ EDIT2:Tentei procurar por algo na Unreal Wiki, mas tudo que encontrei era a sintaxe de declaração (que já estava correta) e uma "solução" que não funcionou. E uma pesquisa Google pelos termos exatos: unrealscript "expecting state got function" EDIT3: Para de trincar meu texto DX
  23. samuelmalloy

    Ajuda Python

    # -*- coding: utf-8 -*- valor1=input('Valor de Vetor:') valor2=input('Valor Modulos: ') func=input('Numero de Funcionario: ') valor3= (valor1*valor2)/func print (valor3) este é o script que fiz na minha 1° aula mas toda vez que rodo ele apresenta este erro: File "func.py", line 1 valor1=input('Valor de Vetor:') ^ IndentationError: unexpected indent o que seria?
  24. Eu fiz esse código para comparar a chave1 com a chave2 e exibir a menssagem2 caso as chaves forem diferentes.. porem eu coloco a chaves iguai e ele só amostra a mensagem2 Scanner scan = new Scanner(System.in); Random ran = new Random(); int idade; String nome,chave2, mensagem2,mensagem; String letras = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVYWXZ"; String texto = ""; int num = -1; for( int i = 0; i < 2; i++ ) { num = ran.nextInt( letras.length() ); texto += letras.substring( num, num + 1 ); } String chave = ""; int index = -1; for( int i = 0; i < 20; i++ ) { index = ran.nextInt( letras.length() ); chave += letras.substring( index, index + 1 ); } System.out.println(chave); System.out.println("Mensagem"); mensagem = scan.nextLine(); mensagem2 = texto; System.out.println("Digite a chave"); chave2 = scan.nextLine(); if(chave==chave2){ System.out.println(mensagem); } else if (chave != chave2) { System.out.println(mensagem2); }
  25. Wallyson_Ferreira

    Labels

    Galera estou precisando de uma ajudinha, estou fazendo um pequeno programa para contar moedas de um cofre, mais deu um BUG como é que eu faço para que uma label me retorne um numero quebrado com duas casas apos a virgula. float valC5 = (float)0.05; //Valor de 5 Centavos float retC5 = Float.parseFloat(txtC5.getText()); //Retorno da quantidade de moedas no campo de texto Float resC5 = valC5 * retC5; //Multiplicando valor * quantidade de moedas String resSc5 = Float.toString(resC5); //modificando resultado para String lblResultado1.setText(resSc5); //Mostrar resultado no Label Na segunda imagem quando coloco 21 moedas retorna um erro to pra morrer mais não consigo concertar isso...
×
×
  • Criar Novo...