Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Tailor System (https://forums.graalonline.com/forums/showthread.php?t=76932)

oo_jazz_oo 09-26-2007 04:42 AM

Tailor System
 
1 Attachment(s)
Here is a tailor system I made....
This is the first thing I have posted in the code gallery. :P
I know my style of scripting is...not as effecient as it can be, but thats how I learned, so...yeah.
Feel free to use this, change it, edit it, do w/e.
Just at least give me some credit....

Sorry its in an attachment,....but it wouldnt let me post it all. =/

Kyranki 09-26-2007 05:01 AM

Near the bottom where you declared the variable "this.t" that would be better off being a temporary variable as it doesn't need to exist beyond that function.

Also the multiple if checks is ridiculous when you could have made it much easier on yourself by tokenizing the players chat and then using switch and case statements.

This isn't what I would expect from someone who supposedly was to be given a chance at GST. >_>

Twinny 09-26-2007 06:57 AM

PHP Code:

  tailor_inp1.text this.t[0];
  
tailor_inp2.text this.t[1];
  
tailor_inp3.text this.t[2];
  
tailor_inp4.text this.t[3];
  
tailor_inp5.text this.t[4]; 

Stuff like this could easily be using a for() statement... as for chat commands, you should at least be doing if, else if, else if etc or, as Stan pointed out, a switch statement.

Mark Sir Link 09-26-2007 01:15 PM

also, shouldn't GUI components use
position = {x, y}
or "x y"


and extent = {l, w}
extent = "l w"
instead of
x =, y =, width, height/

oo_jazz_oo 09-26-2007 11:16 PM

Ok, I told you, my scripting isnt as effecient. -.-
I know I could have done a for() on the tailor text or w/e.
And I know I could have done a tokeninze on the players chat, but I didnt because I didnt think I was going to keep the color setting commands.
They were temp, and I just didnt remove them.

Tigairius 09-27-2007 12:09 AM

Nice job, buddy! Keep it up! Work on a few of the things mentioned in this thread :)

Inverness 09-29-2007 04:12 PM

extent = {w, h} and position = {x, y} should be used. position = "x y" only works for compatibility with Torque GUI script. And the width, height, x, and y exist for compatibility in Graal, but they're really just reflections of position and extent.


All times are GMT +2. The time now is 06:59 AM.

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