ZoriaRPG

Some New ZScript Syntax

Sep 18th, 2018
98
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. script typedef ffc class; //can now declare 'class script'.
  2. class cript my_class
  3. {
  4.     const int SZ = 256; //constant defined at script scope
  5.     //globally available as my_class.SZ
  6.     //access locally as 'SZ'
  7.     int RAM[SZ]; //array defined at script scope, sized to constant SZ
  8.     //globally available as my_class.RAM[]
  9.     //acces locally as 'RAM[]'
  10. }
  11.  
  12.  
  13. void foo()
  14. {
  15.     int size = my_class.SZ; //get the constant SZ from pasudo-class 'my_script'
  16.     int a = myclass.RAM[1]; //get data from the array in that 'class'
  17. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×