Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 05-03-2011, 02:37 AM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
I think you misunderstood ms. I mean 3 or 4 new classes a year. Each class will have weekly assignments. Think of it as highschool where each new class Is incoming freshman. As new classe come in the old ones will help teach them but also continue learning to script. Ideally the assignments never stop, just keep getting harder. Missing an assignment is in no way a problem.

Edit: I just realized that when I'm saying classes I should be saying groups. Class is every week, and 3 or 4 groups will join the "school" a year. Does that make sense
__________________
Reply With Quote
  #42  
Old 05-03-2011, 02:50 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
yup umm papa can u priviate message me about how to set up google wave ect i only use teamspeak and vent i never even heard of google wave
__________________
Graal Developer
Reply With Quote
  #43  
Old 05-03-2011, 02:58 AM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
I'll just tell everyone here.

Once you have a gmail email, go to wave.google.com and make an account. Let me know some how (forum pm, in this thread, etc.) that you did that and i can add you to the roster.

Again, the initial sign up may annoy some, but bare with me as we try this. After experimenting with it with some others, it seems quite efficient.
__________________
Reply With Quote
  #44  
Old 05-03-2011, 03:02 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by papajchris View Post
I think you misunderstood ms. I mean 3 or 4 new classes a year. Each class will have weekly assignments. Think of it as highschool where each new class Is incoming freshman. As new classe come in the old ones will help teach them but also continue learning to script. Ideally the assignments never stop, just keep getting harder. Missing an assignment is in no way a problem.

Edit: I just realized that when I'm saying classes I should be saying groups. Class is every week, and 3 or 4 groups will join the "school" a year. Does that make sense
It sounds like it is going to take a loooot of people to keep this up lol
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #45  
Old 05-03-2011, 03:02 AM
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
Punctuation should be a requirement for joining the group.
__________________
Reply With Quote
  #46  
Old 05-03-2011, 03:07 AM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Quote:
Originally Posted by Devil_Lord2 View Post
It sounds like it is going to take a loooot of people to keep this up lol
Not really, and i have no intention of leading all the other groups. My hope is that groups form and follow in our footsteps. As long as another person wants to learn with me, im satisfied. I am just trying to create a network.
__________________
Reply With Quote
  #47  
Old 05-03-2011, 04:07 AM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Okay sorry to do this, but I think a forum would be better than google wave. I say this because its easier for people to sign up and join and its easier to show threads to non members.

Please take a minute to check out http://scriptingschool.forumotion.com/.

This will not change, so don't worry. Sorry about the confusion.

I put up a mini practice script (pretty simple) Under Assignments/Week One. You can see the instructions on top and then see posts below. Feel free to comment on people's scripts (I put a simple script up to show you). If you need help, go to the help section.
__________________

Last edited by papajchris; 05-03-2011 at 04:55 AM..
Reply With Quote
  #48  
Old 05-03-2011, 05:12 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Also, as you have different lessons, its important to teach good styling.

PHP Code:
function onCreated() {
  echo(
"Hello World!");

is much better than
PHP Code:
function onCreated(){echo("Hellow World!");} 
Or any other variation, as people like to do weird stuff while styling...
It just makes it easier for others to read your code.

Also, indenting the script inside a function/brackets makes it much easier to read than if everything is indented the same. :P
__________________

Reply With Quote
  #49  
Old 05-03-2011, 08:37 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by papajchris View Post
Okay sorry to do this, but I think a forum would be better than google wave. I say this because its easier for people to sign up and join and its easier to show threads to non members.

Please take a minute to check out http://scriptingschool.forumotion.com/.

This will not change, so don't worry. Sorry about the confusion.

I put up a mini practice script (pretty simple) Under Assignments/Week One. You can see the instructions on top and then see posts below. Feel free to comment on people's scripts (I put a simple script up to show you). If you need help, go to the help section.
Can you post assignments on here since my subscription is on here and I can see if someone replies, then I can head over to there? Because I honestly don't think I will check weekly or bi-weekly and will probably forget in a few weeks to even check it..

I'll check it now though! :]

Quote:
Originally Posted by oo_jazz_oo View Post
Also, as you have different lessons, its important to teach good styling.

Also, indenting the script inside a function/brackets makes it much easier to read than if everything is indented the same. :P
Oh geez, I have when people do
PHP Code:
function onHurtMyBrain(){ 
  
below "horribleimo";
  if (
youDoItLikeThis){
    
this.confusedMe "a lot.";
  } else { 
  
something below;
  }

or if (
wheredthebracketsgo)    what ++; 
or such.. I've never been taught to do it, and seeing others doing it I say it is bad styling.. But then I saw that Stefan does it in his 2001 baddies.. D: I had to tell ZeroG I'd never criticize on him doing it again. :c

Also, I hate that foo bar stuff as well >.> for all I know it is a built in variable or function I don't know about or care to learn.

Anyway, sometimes the simplest scripts can confuse you when you are not use to the styling or if the styling is poor...


Quote:
Originally Posted by cbk1994 View Post
Punctuation should be a requirement for joining the group.
Or anyone who is willing to learn from their mistake or at least try..
I don't think anyone should be left out because of lack of knowledge if they really want to, and can, learn. :c
Then again, I don't recommend anyone to try if they do not have Access to RC... D:
Although, I think I know someone trying to build a program to check code like the RC does..
It would be extremely helpful.
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz




Last edited by Devil_Lord2; 05-03-2011 at 09:06 AM..
Reply With Quote
  #50  
Old 05-03-2011, 09:15 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Whats peoples on thoughts as far as readability goes if I did:
NPC Code:
function onCreated()echo "Hello world!";



I think it improves readability as its a smaller area to focus on however some might argue it decreases readability, can someone please clarify this?
Reply With Quote
  #51  
Old 05-03-2011, 11:53 AM
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 Tricxta View Post
Whats peoples on thoughts as far as readability goes if I did:
NPC Code:
function onCreated()echo "Hello world!";



I think it improves readability as its a smaller area to focus on however some might argue it decreases readability, can someone please clarify this?
The most important thing is consistency. However, I don't think there's a scripter who wouldn't smack you for doing that, especially since the echo is GS1. It doesn't improve readability to exclude braces, it just makes it harder to change later.

PHP Code:
function onCreated() {
  echo(
"Hello world!");

__________________
Reply With Quote
  #52  
Old 05-03-2011, 12:03 PM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Is there any website that contains all the commands available to use in GS2? And Gscript wiki isnt it, it contains the basics and only the basics, nothing like how to disable the chat bar or something obscure. Or is everything just thrown around everywhere and is a complete mess?
Reply With Quote
  #53  
Old 05-03-2011, 12:28 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 Tricxta View Post
Is there any website that contains all the commands available to use in GS2? And Gscript wiki isnt it, it contains the basics and only the basics, nothing like how to disable the chat bar or something obscure. Or is everything just thrown around everywhere and is a complete mess?
GScript is object-oriented, so you want to get away from thinking of it as command-based. To disable the chat bar, you need to act on its GUI object, named ChatBar.

There is a list of server functions here, and a list of client functions here. These are not completely up-to-date, so use scripthelp as well.
__________________
Reply With Quote
  #54  
Old 05-03-2011, 02:47 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by PhilSmith View Post
Also, being the first to try this could be difficult. This dummy group needs to get. It right or people will be hesitant to try it again. I don't think we will have that problem though, given the dedication of some of the members. Also, once we have a curriculum to base off of and the setup made, I don't see why other classes couldn't deviate from this (other NAT GANI, LAT or even GFX classes)
No pressure...
But i agree lol. I am looking forward to this!
i hope to see a lot of people there!
__________________
Reply With Quote
  #55  
Old 05-03-2011, 05:11 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
The first assignment is already up (Well a practice one)! So sign up on the forums and post. Me and some others have already met on testbed and began working on making the practice assignment more complex. From this point on I am going to copy/paste our conversations (if they were productive) so that they could be used as a guide as many questions were asked. We will be on there tonight!

Good News! - I am looking into a ventrillo server strictly for those who want to script.
__________________
Reply With Quote
  #56  
Old 05-03-2011, 08:38 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
I know this is a double post, but i'd like it to show up as an updated thread.

I'd like some input on what we will be working on. Right now I think it would be a great idea to work on a server pack (As many of you are starting servers). We will be working on a
  • Tailor system
  • Hat System
  • Jail System
  • Event System
  • Mining System
  • Custom HUD and Inventory
  • Event Prizes
  • Fishing

(Not necessarily in this order)

Now these cover a wide range of things. For example the hat system would start off as setting a players hat, and eventually creating a GUI for it (As Jerret talked about above). Same with the Tailor Script. These options cover a wide range of skill from simply setting a skin color to have a GUI that saves outfits.

My intention is to eventually compile worthy scripts and hand them out as Server Start-up Packs (What the GDT use to do) or training guides (Of course with the scripters permission).
__________________
Reply With Quote
  #57  
Old 05-03-2011, 09:19 PM
IaMnOtAnEwB2_red38 IaMnOtAnEwB2_red38 is offline
Registered User
Join Date: Aug 2010
Posts: 1
IaMnOtAnEwB2_red38 is on a distinguished road
This seems interesting, a few years ago I was in the middle of learning GS1 and I seemed to catch on quickly, but never gave myself a chance to pick it back up after the GS2 conversion. Count me in.

Email: [email protected]
Reply With Quote
  #58  
Old 05-03-2011, 10:40 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Sorry but that forum is just dreadful.

Couldn't you just use the Group (Moderated) functionality on these forums, and Thread posts for assignments/challenges?
__________________
Quote:
Reply With Quote
  #59  
Old 05-03-2011, 10:41 PM
Samurai_X2689 Samurai_X2689 is offline
Cap' n Jack
Join Date: Jan 2006
Posts: 30
Samurai_X2689 is on a distinguished road
I always wanted to learn scripting and I have learned ssome scripting from my buddies on graal. However, I think this is a good opportunity for me to learn more and get better at scripting. So count me in.


E-mail: [email protected]
__________________

Saranghae! No Homo!
Reply With Quote
  #60  
Old 05-03-2011, 10:52 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
Sorry but that forum is just dreadful.

Couldn't you just use the Group (Moderated) functionality on these forums, and Thread posts for assignments/challenges?
I was going through a few themes so hopefully you took a look while I was adjusting things. I personally like having it on a different website as all scripting things are in one place. Once a thread dies I plan to adjust the title to what the thread may be about (such as functions) and make it easy to search. I like the ability to make changes, but if it ends up not working we can come here
__________________
Reply With Quote
  #61  
Old 05-04-2011, 12:08 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
I've been scripting for a while on Graal now, but there are quite a few things that I feel I still do not understand fully, so sign me.

[email protected]
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #62  
Old 05-04-2011, 12:08 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
*sign me up
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #63  
Old 05-04-2011, 12:25 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by Tricxta View Post
Whats peoples on thoughts as far as readability goes if I did:
NPC Code:
function onCreated()echo "Hello world!";



I think it improves readability as its a smaller area to focus on however some might argue it decreases readability, can someone please clarify this?
I hate that! My first script I decided to work on was learning Dustys hammer and he did things sort of like that.. the missing brackets are the only reason I couldn't understand the parts I wanted to learn were
level.tiles[x,y];
and
updateboard(x,y,L,W);

I went through the script so many times trying to figure out the part of the script that did it only to realize it was two commands..

Then I made a beach. ^.^
But I've asked so many people to help me get what was doing it and no one could tell me..

Quote:
Originally Posted by cbk1994 View Post
GScript is object-oriented, so you want to get away from thinking of it as command-based. To disable the chat bar, you need to act on its GUI object, named ChatBar.

There is a list of server functions here, and a list of client functions here. These are not completely up-to-date, so use scripthelp as well.
Is this better then commands.rtf? / the new GS2 server cammands file that was floating around somewhere on the forum?

Quote:
Originally Posted by Emera View Post
No pressure...
But i agree lol. I am looking forward to this!
i hope to see a lot of people there!
It's already up, you should go to:
http://scriptingschool.forumotion.com/.


Quote:
Originally Posted by IaMnOtAnEwB2_red38 View Post
This seems interesting, a few years ago I was in the middle of learning GS1 and I seemed to catch on quickly, but never gave myself a chance to pick it back up after the GS2 conversion. Count me in.

Email: [email protected]
I know exactly what you mean! It took me 2-3 months ago to start learning GS2 after learning GS1 about five years ago.. after Babylon died 'in my head apparently it carried on for a good amount of time' along with GS1, I gave up on trying to learn too.

Quote:
Originally Posted by fowlplay4 View Post
Sorry but that forum is just dreadful.

Couldn't you just use the Group (Moderated) functionality on these forums, and Thread posts for assignments/challenges?
I agree.. It would be nice to have him as a moderator and our own thing on the forum.. I like the PHP system on here with the nice colors. ;o

Quote:
Originally Posted by papajchris View Post
I was going through a few themes so hopefully you took a look while I was adjusting things. I personally like having it on a different website as all scripting things are in one place. Once a thread dies I plan to adjust the title to what the thread may be about (such as functions) and make it easy to search. I like the ability to make changes, but if it ends up not working we can come here
But I also agree with this... if he does do it on here, there is a chance it could 'die' and a lot of people would not want to post on it because of the so called 'proper etiquette' of this forum. I know I wouldn't want to be yelled at again for posting on a 'dead' thread that interests me and can annoy a whole lot of other people.. I think if he could manage his own subject / thread where we could post subforums inside of it, it could go well on here.

It would get all messy in only one or two threads..

Again, I'd rather post on here.. and greatly like the PHP system on here, but as he said, he'd at least be able to manage it on there. Perhaps this could be worked out?
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #64  
Old 05-04-2011, 02:22 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Quote:
Originally Posted by iBeatz View Post
so sign me.
*engraves initials on head*
Reply With Quote
  #65  
Old 05-04-2011, 02:27 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by Devil_Lord2 View Post
I hate that! My first script I decided to work on was learning Dustys hammer and he did things sort of like that.. the missing brackets are the only reason I couldn't understand the parts I wanted to learn were
level.tiles[x,y];
and
updateboard(x,y,L,W);
Actually, having single like script blocks within if() or loops is common.

The problem in this case is he was asking about a function without brackets.

PHP Code:
function onCreated() {
  if (
foo == bar) return true;
}
function 
onPlayerEnters() {
  for (
pl:players)
    
pl.chat "Welcome!";

Both of which are used commonly. At that point, I think its a matter of preference whether you include brackets for 1 line codes.
__________________

Reply With Quote
  #66  
Old 05-04-2011, 02:51 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
I always script stuff like this...

PHP Code:
//instead of doing this:

function onCreated() {
  
commands
}

//I do this..

function onCreated()
{
  
commands

I've always done it, that's just the way I script, but do you think should get in the habit of doing it the first way?
Reply With Quote
  #67  
Old 05-04-2011, 03:26 AM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Hey everyone the ventrilo server just went up! go to scriptingschool.forumotion.com and its flashing on the home page! I'd post it here, but I am not sure if that is against the rules.
__________________
Reply With Quote
  #68  
Old 05-04-2011, 03:31 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
I think:
PHP Code:
onCreated(){


originated from gs1 which is what I still use

PHP Code:
onCreated()
{


Is kinda from languages like java and C#, I was only introduced to this style when my lecturers showed me this and threatened to take off marks if I didnt do it like that lol. I personally think the second way Is alot cleaner and yer new scripters should practice this style intead
Reply With Quote
  #69  
Old 05-04-2011, 03:45 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by MattKan View Post
I've always done it, that's just the way I script, but do you think should get in the habit of doing it the first way?
Up to you, but I've taken C Programming classes and learned the first way.. D: it may be a slight difference but the second way gives me a headache and confuses me sometimes.. even } else { lines too..

For anyone else who wants to comment along the lines of me not being able to read slight differences in code easily without strain.. I dropped out of Computer Science for Fine Arts. D:

So I no longer have to worry about it..


Quote:
Originally Posted by oo_jazz_oo View Post
Actually, having single like script blocks within if() or loops is common.

The problem in this case is he was asking about a function without brackets..
I now hate the common folk, they are meanies.
I thought Dusty did it like that to confuse new people..

Oh well.. I guess I will have to work around it lol
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #70  
Old 05-04-2011, 05:09 AM
Seich Seich is offline
Noctorious' NeoHunter
Seich's Avatar
Join Date: Jun 2008
Location: Honduras
Posts: 193
Seich will become famous soon enough
Send a message via MSN to Seich Send a message via Yahoo to Seich
Quote:
Originally Posted by Devil_Lord2 View Post
Up to you, but I've taken C Programming classes and learned the first way.. D: it may be a slight difference but the second way gives me a headache and confuses me sometimes.. even } else { lines too..

For anyone else who wants to comment along the lines of me not being able to read slight differences in code easily without strain.. I dropped out of Computer Science for Fine Arts. D:

So I no longer have to worry about it..




I now hate the common folk, they are meanies.
I thought Dusty did it like that to confuse new people..

Oh well.. I guess I will have to work around it lol
The way you style your code is just personal preference. You can use whichever way you feel more comfortable. If you're working with other people it is recommended to be as clean as possible and to following a common styling guideline so that they can easily follow your code and that you can follow theirs.
Reply With Quote
  #71  
Old 05-04-2011, 07:01 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
There are many ways one can style code...some are just uglier (and wrong-er :3).

Such as putting brackets on their own lines. I used to do this, but I think it was GK who actually taught me not to. o_o
Putting brackets on their own lines increases line size, which isn't really a bad thing, its just unnecessary; but not necessarily wrong.

The only thing that irks me, is when people dont indent properly. >:[
PHP Code:
function onCreated() {
  
zomg();
  } 
Drives me crazy. Put the bracket on the indentation as the function declaration!
Because, if you do that all the time, you end up with very ugly scripts, especially if its not consistent.

PHP Code:
function onCreated() {
  
with (findplayer("Stefan")) {
    if (
player.hearts 3) {
    
player.chat "Hooray!";
      }
}
  } 
WTF is that. What. Is. That.
__________________

Reply With Quote
  #72  
Old 05-04-2011, 08:32 AM
Clockwork Clockwork is offline
ᶘ ᵒᴥᵒᶅ...ᶘ ಠᴥಠᶅ❤...ℳℴℯ
Clockwork's Avatar
Join Date: Feb 2007
Location: Pennsylvania
Posts: 2,071
Clockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant futureClockwork has a brilliant future
I'd love to try this out

Sign meh up.
__________________
Reply With Quote
  #73  
Old 05-04-2011, 10:36 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by papajchris View Post
Please take a minute to check out http://scriptingschool.forumotion.com/.

I put up a mini practice script (pretty simple) Under Assignments/Week One. You can see the instructions on top and then see posts below. Feel free to comment on people's scripts (I put a simple script up to show you). If you need help, go to the help section.
Sign up here. :]
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #74  
Old 05-04-2011, 11:38 AM
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 oo_jazz_oo View Post
Actually, having single like script blocks within if() or loops is common.

The problem in this case is he was asking about a function without brackets.

PHP Code:
function onCreated() {
  if (
foo == bar) return true;
}
function 
onPlayerEnters() {
  for (
pl:players)
    
pl.chat "Welcome!";

Both of which are used commonly. At that point, I think its a matter of preference whether you include brackets for 1 line codes.
Please don't teach people to exclude braces for one-line statements . It's a hard habit to break, and it just makes it a pain when you try to change code later.
__________________
Reply With Quote
  #75  
Old 05-04-2011, 04:50 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
For those of you who needs access to the Testbed Server, read this:

http://forums.graalonline.com/forums...21#post1647521


By providing everything I need to get your access up and running, that will be better for both. 60-70% people who ask me for access doesn't provide me with (enough) information I need to set up access Read the thread and you will!
__________________
Reply With Quote
  #76  
Old 05-04-2011, 07:35 PM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Hey Chompy, on the Graal news / F1 page it says:

"If you wish to participate, simply click here to fill out the submission form. (Be sure to include your email for contact information.) "


And when I click the link, it takes me to a

"Page not found

The page you request is not available on GraalOnline. We take in note to try to correct the problem. Please, back to home page

(Click here if your browser does not automatically forward you)
"

Page.


I don't know if it was linked bad, or not created yet, but I thought you should know..


Also, my friend ZeroG that I asked could get on Testbed a while ago, I forgot his gold ran out.. he can still do everything on the server he owns, so I guess he will work on his stuff there lol..

I just wanted him to come on Testbed since I can only work on Testbed with a classic account.. it gets lonely lmao. So, he doesn't need the access anymore, no longer a gold subscriber. D: I still appreciate it though. ^.^
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #77  
Old 05-04-2011, 07:55 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
--Update ---
Sent in all the accounts who needed Access on testbed WHO filled out a form. If you replied in this thread I did NOT send your account. Please forum PM Chompy or Clockwork
__________________
Reply With Quote
  #78  
Old 05-04-2011, 08:04 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Aeko/Clockwork needs money for the Testbed server.

Quote:
Originally Posted by Clockwork View Post
FYI: Testbed has 26 days before it has to be paid for again... and at 72$ it's not exactly cheap for someone w/o a job :P

Last time I got a little less than half, it'd be nice for the same to happen (tho only 2 people donated =.= )

Donate here
Considering the amount of support for this group, you guys should have an easy time helping him out in the process.
__________________
Quote:
Reply With Quote
  #79  
Old 05-04-2011, 08:41 PM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by fowlplay4 View Post
Aeko/Clockwork needs money for the Testbed server.

Noooooo :'[

Quote:
Originally Posted by fowlplay4 View Post
Considering the amount of support for this group, you guys should have an easy time helping him out in the process.
I hope so.. D:
I like the testbed server seeing it is the only server I am aloud to actually work on being classic..

I'd help out if I could, I'm not financially stable either.
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #80  
Old 05-05-2011, 12:48 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by cbk1994 View Post
Please don't teach people to exclude braces for one-line statements . It's a hard habit to break, and it just makes it a pain when you try to change code later.
I dont see a huge problem in using one line codes without brackets for certain instances.
PHP Code:
function check(xy) {
  if (
== y) return true;

Like in that instance. Does it really make it any more readable...any more efficient...any more anything by adding the brackets?
__________________

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 08:13 AM.


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