Entrar
Últimos assuntos
» Preciso de ajudapor AftonDuGrau Dom 21 Abr 2024, 20:18
» Como faz o evento drawn GUI, não se repetir?
por aminaro Sex 19 Abr 2024, 20:30
» Como ajustar velocidade de cada frame da animação no game maker
por Ralphed Qui 18 Abr 2024, 18:28
» PROBLEMAS COM FÍSICAS DE ÁGUA
por aminaro Ter 16 Abr 2024, 10:07
» Retorno da GMBR!!!
por Ralphed Sex 12 Abr 2024, 22:45
» JOGADOR PARANDO NO AR QUANDO ATACA
por aminaro Qua 10 Abr 2024, 13:51
» Problemas com texto interativo
por Kaaru72 Dom 07 Abr 2024, 11:31
» Erro escondido e indecifrável
por dev_gabize.azv Qui 04 Abr 2024, 10:11
» Mudar cor de apenas uma palavra
por Ralphed Sáb 30 Mar 2024, 00:39
» Procuro Programador de game maker
por Wou Sex 15 Mar 2024, 10:27
» Mod APK
por gamerainha Qua 13 Mar 2024, 06:30
» Aceito pedidos de sprites (Com exemplos meus)
por Sevilha Qua 28 Fev 2024, 12:17
» Inventário simples
por Isquilo_Roedor Qui 22 Fev 2024, 15:18
» Problemas na programaçnao de inimigo [jogo DOOM LIKE]
por Black Mirror Dom 11 Fev 2024, 13:34
» ANDROID MULTI TOUCH
por DiegoBr Dom 04 Fev 2024, 12:13
» Servidor de Discord do fórum?
por Lighter Sáb 27 Jan 2024, 17:18
» Save e Load Json
por Klinton Rodrigues Qui 25 Jan 2024, 11:12
» Colisão com mais de um objeto
por aminaro Seg 22 Jan 2024, 15:02
» Oi sou novo aqui
por Thiago Silveira Alexandre Sáb 20 Jan 2024, 20:55
» Como acessar conteudo comprado no marketplace
por macmilam Sex 19 Jan 2024, 07:42
» Devlogs em vídeos do Block Room
por Joton Seg 15 Jan 2024, 16:56
» Alguém aqui já ganha dinheiro com seus games?
por Joton Seg 15 Jan 2024, 16:49
» ACERVO GMBR MAGAZINE
por Joton Qui 11 Jan 2024, 19:21
» como aumentar o obj sem aumentar a colisão??
por GabrielXavier Qua 10 Jan 2024, 07:21
» Asteroid Core - Early Acesse Update [0.2.0.0]
por JOZ. Seg 08 Jan 2024, 14:39
problema com script
3 participantes
Página 1 de 1
problema com script
bem gente eu a algum tempo tenho esta merda(desculpe é que estou com raiva do gm) de problema:
___________________________________________
FATAL ERROR in
action number 1
of Other Event: User Defined 0
for object obj_man:
COMPILATION ERROR in code action
Error in code at line 34:
^
at position 1: Symbol } expected.
diz que na linha 34 tem problema mais o código só tem 32 linhas!
codigo:(não vou polo em spoiler)
with (obj_man){
//here the AI that knows of the gernade will try to shout to nearby AI to inform them about it.
/*Before he shouts to another AI to inform them, first we need to make sure of the following:
*the AI is close enough to shout too.
*the AI doesn't already know about the gernade
*the AI can even be harmed by the gernade, meaning in the blast radius and not behind a wall already
This is all in the following IF statment
*/
others_nearest_nade = other.nearest_nade;
if (id != other.id)&&(point_distance(x, y, other.x, other.y) <200)&&((mode=0)or(mode=3))&&(point_distance(x, y, others_nearest_nade.x, others_nearest_nade.y) < global.exRadius)&&(!collision_line(x,y,other.x,other.y,obj_wall,true,true))&&(!collision_line(x,y,others_nearest_nade.x,others_nearest_nade.y,obj_wall,true,true))
{
//if it got to here then we are going to shout to this AI to inform him of the gernade
alarm[0]=10+random(5);
mode=1;
nearest_nade = others_nearest_nade;//set the gernade that he knows of
//Now he has been told of the gernade and is in reacting mode
//draw a text of the OTHER player shouting to THIS player of the gernade
ID=instance_create(other.x, other.y, obj_text);
ID.yell="Grenade!!";
ID.owner=other.id;
//and draw a line between the two people so we can see what's happaning
if (global.lines){
ID=instance_create(0, 0, obj_line);
ID.manA=id;
ID.manB=other.id;
ID.color=c_lime;
}
}
}
me ajudem serei grato!obrigado!
___________________________________________
FATAL ERROR in
action number 1
of Other Event: User Defined 0
for object obj_man:
COMPILATION ERROR in code action
Error in code at line 34:
^
at position 1: Symbol } expected.
diz que na linha 34 tem problema mais o código só tem 32 linhas!
codigo:(não vou polo em spoiler)
with (obj_man){
//here the AI that knows of the gernade will try to shout to nearby AI to inform them about it.
/*Before he shouts to another AI to inform them, first we need to make sure of the following:
*the AI is close enough to shout too.
*the AI doesn't already know about the gernade
*the AI can even be harmed by the gernade, meaning in the blast radius and not behind a wall already
This is all in the following IF statment
*/
others_nearest_nade = other.nearest_nade;
if (id != other.id)&&(point_distance(x, y, other.x, other.y) <200)&&((mode=0)or(mode=3))&&(point_distance(x, y, others_nearest_nade.x, others_nearest_nade.y) < global.exRadius)&&(!collision_line(x,y,other.x,other.y,obj_wall,true,true))&&(!collision_line(x,y,others_nearest_nade.x,others_nearest_nade.y,obj_wall,true,true))
{
//if it got to here then we are going to shout to this AI to inform him of the gernade
alarm[0]=10+random(5);
mode=1;
nearest_nade = others_nearest_nade;//set the gernade that he knows of
//Now he has been told of the gernade and is in reacting mode
//draw a text of the OTHER player shouting to THIS player of the gernade
ID=instance_create(other.x, other.y, obj_text);
ID.yell="Grenade!!";
ID.owner=other.id;
//and draw a line between the two people so we can see what's happaning
if (global.lines){
ID=instance_create(0, 0, obj_line);
ID.manA=id;
ID.manB=other.id;
ID.color=c_lime;
}
}
}
me ajudem serei grato!obrigado!
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
Ta faltando um " } "
mleoni- Data de inscrição : 06/03/2013
Reputação : 23
Número de Mensagens : 81
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
___________________________________________
COMPILATION ERROR in Script: scr_warn_others
Error in code at line 33:
}
^
at position 2: Unexpected symbol in expression.
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
Dessa vez tem um " } " a mais.
mleoni- Data de inscrição : 06/03/2013
Reputação : 23
Número de Mensagens : 81
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
mais com um } a menos não funfo e com } a mais tambem não
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
No primeiro código vc tem que colocar um } a mais,e no segundo tirar um.
"at position 1: Symbol } expected." Significa "na posição 1 : simbolo } esperado" ... e unexpected é que não é esperado,ou seja,não tem que ter.
"at position 1: Symbol } expected." Significa "na posição 1 : simbolo } esperado" ... e unexpected é que não é esperado,ou seja,não tem que ter.
mleoni- Data de inscrição : 06/03/2013
Reputação : 23
Número de Mensagens : 81
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
isso significa que tem de ficar
}
}
}
}
ou
}
}
}
}
}
}
}
ou
}
}
}
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
Cara,se o código for só isso mesmo,me parece estar certo,do jeito que tava.Me manda a engine que posso consertar pra vc.
mleoni- Data de inscrição : 06/03/2013
Reputação : 23
Número de Mensagens : 81
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
ta aqui a engine! o problema é que alguem podera pegar a engine e modificala melhor eu por mais coisas
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
Pô cara,era só colocar um } naquele código mesmo.
mleoni- Data de inscrição : 06/03/2013
Reputação : 23
Número de Mensagens : 81
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
não funfa com 1 nem com 2 nem com 3 nem com 4 nem com 5 nem com 6 nem com 7 eu ja testei
LightSpeedy- Games Ranking :
Notas recebidas : C
Data de inscrição : 24/04/2013
Reputação : 40
Número de Mensagens : 354
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: problema com script
Não eh esse erro. O problema é que você definiu valores relativos para variáveis não declaradas (no script q deu erro, o problema foi resolvido apenas botando um "}" no final dele). E você fez isso em VÁRIOS. LUGARES. Você entende o que é uma variável e como usar? Tem aulas aqui no fórum sobre isso, dê uma olhada, será importante.
Brother27- Games Ranking :
Notas recebidas : C
Data de inscrição : 28/06/2012
Reputação : 14
Número de Mensagens : 253
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Tópicos semelhantes
» problema com script
» Problema com script
» Problema com script
» [Resolvido]Problema com Script
» Problema com script de conversa!
» Problema com script
» Problema com script
» [Resolvido]Problema com Script
» Problema com script de conversa!
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|