Javascript "For" statment makes crash the program

Using Javascript from SpiderBasic
User avatar
DjPoke
Posts: 22
Joined: Sat Dec 19, 2015 5:27 pm
Location: France (Corsica)
Contact:

Javascript "For" statment makes crash the program

Post by DjPoke »

The "For" statment in Javascript makes crash the program.
I also noticed that where there is the ";", the script change its color to green...

Code: Select all

! For( var i = 1 ; i < 10 ;i++) {
! }

If OpenWindow(0, 0, 0, 800, 190, "IAS : Intelligence Artificielle Subjective", #PB_Window_TitleBar | #PB_Window_ScreenCentered)
  TextGadget(1, 10, 10, 780, 25, "Saisissez une question et validez", #PB_Text_Center)
  StringGadget(2, 10, 40, 780, 25, "")
  ButtonGadget(3, 290, 70, 100, 25, "Micro")
  ButtonGadget(4, 410, 70, 100, 25, "Ok")
  TextGadget(5, 10, 130, 780, 25, "Voici votre réponse", #PB_Text_Center)
  StringGadget(6, 10, 160, 780, 25, "", #PB_String_ReadOnly)  
EndIf
My Freewares here :
http://retro-bruno.fr/
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Javascript "For" statment makes crash the program

Post by Peter »

JavaScript is case sensitive.

For != for ;-)

Greetings ... Peter
User avatar
DjPoke
Posts: 22
Joined: Sat Dec 19, 2015 5:27 pm
Location: France (Corsica)
Contact:

Re: Javascript "For" statment makes crash the program

Post by DjPoke »

Thanks for this information :)
My Freewares here :
http://retro-bruno.fr/
Post Reply