Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 05-02-2008, 10:37 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Skyld View Post
I'm not saying not to release parsers. It's just there are probably infinitely more useful formats out there. For instance, nobody's invented a JSON interpreter yet, and that could be very beneficial with the rising use of HTTP requests (and occasionally, sockets).
;o Well, I'm out of ideas of what to make parsers for.. So ideas/suggestions would be nice :o

And, by JSON, you mean parsing something like..

NPC Code:

{
"firstName": "John",
"lastName": "Connor",
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": 10021
},
"phoneNumbers": [
"212 555-1234",
"646 555-4567"
]
}



and turn it into something like
NPC Code:

this.firstName = "John";
this.lastName = "Connor";

this.address = new TStaticVar();
this.address.streetAddress = "21 2nd Street";
this.address.city = "New York";
this.address.state = "NY";
this.address.postalCode = 10021;

this.phoneNumbers = {
"212 555-1234",
"646 555-4567"
};



just curious, a JSON interpreter sounds interesting, but I dunno if I fully understand what 'interpreter' means.. so.. dunno if the stuff above is correct
__________________
Reply With Quote
  #32  
Old 05-02-2008, 10:52 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Skyld View Post
So, essentially, it's an XML parser with a small amount of recognition for doctype declarations where doctype declarations aren't even needed, or are barely even used by the script? What would I use this for in GScript?
Now you've gone an hurt his feelings
__________________
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 05:44 AM.


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