Jetscript BBcode testing

moyack · 8746

0 Members and 1 Guest are viewing this topic.

Jetscript BBcode testing
on: July 15, 2013, 08:31:43 AM

I'll reserve this thread to test and debug the new Jetscript highlightning. Please fill this topic with code examples to see how it works.

The BBcode is as follows:

[code=jetscript]<Please insert your code here>[/code]

And the result:

Code: JetScript
  1. <Please insert your code here>


Jetscript BBcode testing
Reply #1 on: July 15, 2013, 01:30:48 PM

Code: JetScript
  1. bool b [2]
  2. int i
  3. while (true)
  4.     i += 2
  5.     if (i % 30 == 0)
  6.         break
  7.     endif
  8.     resize b i+1
  9.     b[i] = true
  10. endwhile

Code: JetScript
  1. if (false)
  2.     PlayerAddScore(-PlayerGetScore())
  3. elseif (!true != false)
  4.     exit
  5. else
  6.     PlayerAddScore(2000)
  7. endif
  8.  
  9. debug
  10.     string s = "asdf"
  11.     Message(s)
  12.     free s
  13. enddebug

Code: JetScript
  1. global readonly fixed InitialFuel = 8.00
  2. PlayerAddFuel(InitialFuel)

Code: JetScript
  1. int i = 0
  2. while (i < 8)
  3.     if (i == 4)
  4.         continue
  5.     endif
  6.     Message(IntToString(i))
  7.     i++
  8. endwhile

Code: JetScript
  1. int
  2. fixed
  3. bool
  4. string
  5. void

The theme defaults the font color to white:
« Last Edit: July 20, 2013, 02:47:38 PM by Sourc[e]x »



Jetscript BBcode testing
Reply #2 on: July 20, 2013, 02:02:36 PM


The theme defaults the font color to white:

Bug solved :)


Jetscript BBcode testing
Reply #3 on: July 20, 2013, 10:00:01 PM

More code test from Jetcraft page. Well, it seems ready the highlightning :)

Code: JetScript
  1. readonly int var = 32
  2. global readonly int var = 32
  3.  
  4. var = 64 // Error. Cannot set the value of readonly variable
  5.  
  6. PlayerAddScore(var)
Comments and bug suggestions are welcome :)


Jetscript BBcode testing
Reply #4 on: August 01, 2013, 12:23:36 PM

The JetScript highlighting is looking good :)



Jetscript BBcode testing
Reply #5 on: August 02, 2013, 01:04:44 PM

The JetScript highlighting is looking good :)
Thanks :D I'll open a place to have a way to update this highlightning with new functions. Stay tunned :)


 

Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)