Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-03-2008, 03:45 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by cbkbud View Post
I dislike the GUI builder; I generally don't allow it on servers I work on, it's much cleaner if you script them yourself, and the code matches your standards (perhaps if some options such as braces on new lines, spaces after parenthesis ( x ), etc?)


I agree, sometimes I've needed to switch back and forth between scripts and it is more convenient. But still, I would probably stick with tabs.
Braces on new lines is the devil.

Brace placement is always going to be one of those hotly debated things though

Personally I think masses of whitespace is horrid to look at.

PHP Code:
function onCreated()
{
  
player.chat "This looks horrible";
  if (
you.really.think.this.is.nice == true)
  {
    
player.chat "You ought to be shot.";
  }
  else
  {
    
player.chat "Look at that else. Makes me feel sick.";
  }
}

function 
onCreated()
   {
     
player.chat "I actually saw someone doing this the other day. You know who you are. *slap*";
   }

function 
onCreated() {
  
player.chat "Ah much clearer.";
  if (
you.are.clever == true) {
    
player.chat "Then you probably prefer this";
  } else {
    
player.chat "That is a sexy else.";
  }

You know it makes sense.
__________________

Reply With Quote
  #2  
Old 05-03-2008, 04:18 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 Robin View Post
Braces on new lines is the devil.

Brace placement is always going to be one of those hotly debated things though

Personally I think masses of whitespace is horrid to look at.

PHP Code:
... 
You know it makes sense.
Well, it's a matter of personal preference though.. I style my scripts pretty much as you do..

And I think it's different from community to community (talking about scripting discussion on forums, ie a c++ or java forum) and who you were taught by (when self-learning and look at others scripts you would probably style like that)

Anyways, there are so many discussions on this, that I'll just say, its all personal preference
__________________
Reply With Quote
  #3  
Old 05-03-2008, 04:46 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 Robin View Post
Braces on new lines is the devil.

Brace placement is always going to be one of those hotly debated things though
It's personal preference. I really don't care if you like looking at whitespace, when I am in charge of scripting at a server, that is how it's done.

I feel that it makes it look more organized, on the same line looks too cluttered.

All I'm saying is that it should be added so that people who prefer it can have it (and I could allow it on my server).
__________________
Reply With Quote
  #4  
Old 12-10-2008, 10:09 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
It's personal preference. I really don't care if you like looking at whitespace, when I am in charge of scripting at a server, that is how it's done.

I feel that it makes it look more organized, on the same line looks too cluttered.

All I'm saying is that it should be added so that people who prefer it can have it (and I could allow it on my server).
I'm pretty sure GUI builders in any language are just there to establish some guidelines. You should never blindly accept any generated code, ever.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #5  
Old 12-10-2008, 10:20 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by ApothiX View Post
I'm pretty sure GUI builders in any language are just there to establish some guidelines. You should never blindly accept any generated code, ever.
Personally I always step through all the assembly that gcc generates from my C++ code before letting it assemble it into machine code (and then I go through it again before executing it)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:32 AM.


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