Map_Style Timide

 Inscrit le : 13 Juil 2008 Messages : 71 Programme utilisé (Gm/RmXp/...) : Tout ce qui est neuf !
 | Sujet: Variable name expected Jeu 17 Juil - 13:56 | |
| Salut !
J'ai utilisé un script du forum : | Code: | /* PlateForm Engine 1.00 A - By Master47 2007-2008 */
var Gravity, OldVsp, TempHsp ;
if not ( instance_place(x,y+1,Floor) ) { Gravity = Grav } else { Gravity = 0 }
Vsp += Gravity ;
if keyboard_check(vk_left) && Hsp = 0 { Hsp -= 1 ; } if keyboard_check(vk_right) && Hsp = 0 { Hsp += 1 ; } if keyboard_check(vk_left) && Hsp < 0 { Hsp -= 1 ; } if keyboard_check(vk_right) && Hsp > 0 { Hsp += 1 ; }
if keyboard_check(vk_left) && Hsp > 0 { Hsp -= .25 ; if instance_place(x,y+1,Floor) { } } if keyboard_check(vk_right) && Hsp < 0 { if instance_place(x,y+1,Floor) { Hsp += .25 ; } }
if keyboard_check(vk_up) { if instance_place(x,y+1,Floor) { Vsp = -JumpSize } }
TempHsp = MaxHsp
if keyboard_check(vk_down) && instance_place(x,y+1,Floor) { MaxHsp = DownHsp }
if( Hsp > MaxHsp ) then Hsp = MaxHsp ; if( Hsp < -MaxHsp ) then Hsp = -MaxHsp ;
MaxHsp = TempHsp if( Hsp != 0 ) { if Hsp<0 then Hsp += Fric ; if Hsp>0 then Hsp -= Fric ; }
repeat(abs(Hsp)) { if not (instance_place(x+1*sign(Hsp),y,Floor)) { x+=1*sign(Hsp) } else { for (i=1; i<br" ; / { if not (instance_place(x+1*sign(Hsp), y-i,Floor)) { x += 1*sign(Hsp); y -= i; break; } } }}
if abs(Vsp) > MaxVerticalSpeed then Vsp = MaxVerticalSpeed*sign(Vsp) ;
OldVsp = Vsp ;
if Vsp!=0{ for( i=0 ; iif not instance_place(x,y+1*sign(Vsp),Floor){ y+=1*sign(Vsp); } else{ Vsp=0; break; } } } |
Je compile mais y'a une erreur : line 103 } position 1 variable name expected.
Si vous pourriez m'aider sa serait cool  |
|
Morb Possedé par Mark Overmars


 Age : 20 Inscrit le : 26 Juin 2007 Messages : 1128 Programme utilisé (Gm/RmXp/...) : Blender, DevC++, Garry's Mod, GM(7.0)R, Python 2.5 (idle), Valve hammer editor, Wally Etudes : ENIB
 | Sujet: Re: Variable name expected Ven 18 Juil - 11:20 | |
| Le code est plein d'erreurs, il manques plein de { ou } (et il y en a surement en trop), il y a des break hors des boucles repeat for ou while, il est pas très lisible comme ça faut l'arranger. Bref, c'est bordélique. _________________
 |
|
Map_Style Timide

 Inscrit le : 13 Juil 2008 Messages : 71 Programme utilisé (Gm/RmXp/...) : Tout ce qui est neuf !
 | Sujet: Re: Variable name expected Ven 18 Juil - 20:41 | |
| Ok si quelqu'un connaît un "template" pour un jeu de plateforme qui marche, pourrait-il me faire signe ?
Merci  |
|