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

Javascript "For" statment makes crash the program

by DjPoke Sun Dec 20, 2015 6:55 pm

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
User avatar
Peter
 
Posts: 445
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: Javascript "For" statment makes crash the program

by Peter Sun Dec 20, 2015 8:16 pm

JavaScript is case sensitive.

For != for ;-)

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

Re: Javascript "For" statment makes crash the program

by DjPoke Sun Dec 20, 2015 8:44 pm

Thanks for this information :)
Return to Javascript

Who is online

Users browsing this forum: No registered users and 1 guest