Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Announcements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #16  
Old 06-19-2013, 10:09 AM
Julien Julien is offline
Registered User
Join Date: Jun 2013
Posts: 8
Julien is on a distinguished road
Quote:
Originally Posted by Gunderak View Post
No, it converts it with errors.
The main problem is the md5, the rest I could convert myself, and did.
How would I reference md5?
It would be cool if we could do something like global::md5() or using namespace global;
OK, fine.
The converter is more an helper tool to learn and play with the GS3 syntax. It automatically converts scripts but only to some extent.

If you want to improve the conversion, you can annotate types like for example the "acc" parameter.
Then, you iterate:
  • Launch the conversion
  • Check the syntax
  • Annotate missing types
    etc...

In order to reference missing global functions, you can use extern declarations.

Example:
HTML Code:
extern global {
  function md4(text : string) : string;
}

function onCreated() : void {
  var result : string = md4("hello world");
}
Note: "md5" was added in the meantime.
Reply With Quote
  #17  
Old 06-21-2013, 10:54 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by Julien View Post
In order to reference missing global functions, you can use extern declarations.

Example:
HTML Code:
extern global {
  function md4(text : string) : string;
}

function onCreated() : void {
  var result : string = md4("hello world");
}
Note: "md5" was added in the meantime.
Nope, doesn't work.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #18  
Old 06-21-2013, 02:25 PM
Julien Julien is offline
Registered User
Join Date: Jun 2013
Posts: 8
Julien is on a distinguished road
The "md4" function does not exist, this was just to provide you with an example of how to declare extern global functions.
This code is valid and should not produce any errors when converting or checking syntax online, or when compiling on GS3-enabled NPC servers.

In the meantime, all client-side and server-side global functions and classes are now available for the online conversion tool (including md5 et al.).

If you add //#CLIENTSIDE, you can actually test at the same time the server-side and client-side conversion / syntax.
Reply With Quote
  #19  
Old 06-21-2013, 04:08 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Exclamation

We have updated the conversion tool and also updated the //#GS3 support on servers but you need to restart the npcserver.

Like Julien said, it's now correctly reporting global functions and types and also supports //#CLIENTSIDE (some functions only exist on server-side or client-side). It also prints some more warnings and fixes some bugs (arrays etc.), improving the support for inline-classes.

If you have any ideas or comments then please let us know
Reply With Quote
  #20  
Old 06-21-2013, 05:19 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
//#GS3 support on servers but you need to restart the npcserver.
So does this mean it's officially released? And is that all dev servers as-well?
Reply With Quote
  #21  
Old 06-22-2013, 02:18 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Julien, I know md4 doesn't exist in Graal, I tried it with md5, my whole point is, how the hell do you call methods like md5. It just errors that it doesn't exist.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #22  
Old 06-22-2013, 04:01 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The latest version has been uploaded yesterday to all machines but you might need to restart the npcserver. Normally all global functions should work fine now. There are still some errors though (player.account shows an error), and you are welcome to report problems. We hope to soon use it for important scripts though, like for the iPhone servers.
Reply With Quote
  #23  
Old 06-22-2013, 07:53 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
The latest version has been uploaded yesterday to all machines but you might need to restart the npcserver.
When I tried using GS3 it said it was not enabled. I had to add the following line to the sever options to work:

PHP Code:
enablegs3=true 
To anyone who is curious you need to add that flag, as well as restart your server. And to use GS3 just add //#GS3 to the top of the script.
Reply With Quote
  #24  
Old 06-22-2013, 09:48 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Yes follow the instructions at
http://wiki.graal.net/index.php/Creation/Dev/GScript3
Reply With Quote
  #25  
Old 06-24-2013, 09:40 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
We have fixed object attributes like player.account (TServerPlayer.account), no additional restart required.
Reply With Quote
  #26  
Old 06-24-2013, 09:41 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
graal, using hashtags since npc-server was released

//#CLIENTSIDE //#YOLO
__________________
Reply With Quote
  #27  
Old 06-24-2013, 10:43 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by crono View Post
graal, using hashtags since npc-server was released

//#clientside //#yolo
PHP Code:
//#yolo
//#swag 
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #28  
Old 06-24-2013, 11:51 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by Fulg0reSama View Post
PHP Code:
//#yolo
//#swag 
It is necessary for us on Era to include this in our scripts,
else we're going to have a bad time
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #29  
Old 06-27-2013, 10:54 PM
Tavelate Tavelate is offline
Banned
Join Date: Jun 2013
Location: Paris Sewers, Eurocenter Headquarters
Posts: 9
Tavelate has a little shameless behaviour in the past
Quote:
Originally Posted by BlueMelon View Post
It is necessary for us on Era to include this in our scripts,
else we're going to have a bad time
I feel outstandingly fortunate not being part of that community.
Reply With Quote
  #30  
Old 06-28-2013, 03:36 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by Tavelate View Post
I feel outstandingly fortunate not being part of that community.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.