EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
A guide to scripting - Ready at last!
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4  Next
View previous topic :: View next topic
Author Message
MackTracker





Joined: 01 Sep 2006

Location: Utah

PostPosted: Sun, 3. Sep 06, 02:17    Post subject: Reply with quote Print

This was a great walk through for anyone starting out. I know it sure helped me get started. Reading through this took me about 1 hour. Though I will say that I was already familiar with XML.

I am running X3 Reunion and I don't know if their are any differances but I would like to point out a few errors in this text if you don't mind. Very Happy

FIRST:
I don't know if you are aware but I noticed that your final escourt routine causes the game to freeze should your target decide to land at a Station. (X3 Only, I don't know if it causes X2 to freeze)

I would surmize that this is caused by the fact that the ship's referance is nolonger availiable. This could be taken care of by a test to see wether the ship is about to dock or not.

SECOND:
With regaurd to the last program. If you follow your instructions cairfully and when you come to the part where you are initializing the $count variable, you will get the following wrather than what is printed in your guide:

"$count =<?> … " wrather than "$count <?> …"

From their if you continue you will get:

"$count = == 0 …"

Which of course creats a syntax error. It is common programming practice to use the "=" (Singal equal sign) to mean "Assign the value of x to the value of y" where y=x. Where as the "==" (Double equal sign) means to ask "Are these two values equal to eachother.

Hats off to you for all your effort in putting this walk through together for all of us. I apreciate this because I know it helped me lots. Smile cheers X³: Reunion (Again I have only tested this with X3.)


_________________
Their is one in all!
Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20511 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 3. Sep 06, 02:31    Post subject: Reply with quote Print

MackTracker wrote:
It is common programming practice to use the "=" (Singal equal sign) to mean "Assign the value of x to the value of y" where y=x. Where as the "==" (Double equal sign) means to ask "Are these two values equal to eachother.


actaully its not that common, most languages use the = for both.

the == was mainly only used by C/C++ and the languages that came from it, like java.


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
MackTracker





Joined: 01 Sep 2006

Location: Utah

PostPosted: Sun, 3. Sep 06, 02:33    Post subject: Reply with quote Print

True that, forgive me then. My native language is C/C++. Laughing cheers mate!

Oh and XML uses both "=" & "=="


_________________
Their is one in all!
Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20511 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 3. Sep 06, 02:52    Post subject: Reply with quote Print

yeah mine is c++ as well. but i had to use other languages while i was at collage, unfortuatlly


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gouranga Man





Joined: 19 Dec 2004
Posts: 27 on topic

Thank you for registering your game
PostPosted: Thu, 7. Sep 06, 17:44    Post subject: Reply with quote Print

thank you very much for this I havent read it but i will, love the disclaimer by the way.

"but you just got to put something in like this these days to protect you from stupid stuff. E.g., my cat died cos I forgot to feed it as I spent 2 days learning to script, so I'm going to sue you…"


_________________
Nils Illigitimi Carberundumb, Nirvana, Gouranga
Back to top
View user's profile Send private message MSN Messenger
BattleCommando





Joined: 09 Jan 2008



PostPosted: Thu, 10. Jan 08, 05:44    Post subject: Reply with quote Print

Small problem... link is broken now as x2source is hosed... Evil or Very Mad

Back to top
View user's profile Send private message
Phrathum





Joined: 07 Mar 2007

Location: The core of the sun

PostPosted: Sat, 26. Jan 08, 04:00    Post subject: Reply with quote Print

Does anybody have a copy of this guide they'd be willing to e-mail to me?


_________________
Back to top
View user's profile Send private message MSN Messenger
firefly28



MEDALMEDAL

Joined: 14 Jan 2008
Posts: 208 on topic

Thank you for registering your game
PostPosted: Wed, 6. Feb 08, 20:22    Post subject: Reply with quote Print

Yeah the site is giving sql errors.

On a lighter note - nice inspirational thread LV Smile


_________________
"Freedom is a rich mans dish, a poor mans illusion" :: Firefly28
Cool browser game: http://firefly28.mybrute.com
Back to top
View user's profile Send private message
Buck_Rogers





Joined: 21 Dec 2004
Posts: 1462 on topic
Location: Aberdeenshire
Thank you for registering your game
PostPosted: Thu, 3. Apr 08, 22:11    Post subject: Reply with quote Print

anyone have a copy of this?


_________________
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!
Back to top
View user's profile Send private message MSN Messenger
znix77





Joined: 22 Apr 2008
Posts: 5 on topic
Location: Singapore
Thank you for registering your game
PostPosted: Mon, 12. May 08, 13:37    Post subject: Reply with quote Print

Hi, any possibility of getting a copy of the scripting guide? Am just starting out so would be great to start reading up Smile Thanks!

Back to top
View user's profile Send private message
mstrkaratakus





Joined: 24 Apr 2008
Posts: 1 on topic

Thank you for registering your game
PostPosted: Sun, 1. Jun 08, 19:34    Post subject: Reply with quote Print

Its funny how this game keeps going, even after X3 has come out and been running wild for awhile. I blame it on Gametap! I hadn't even heard of this game until I found it there. Then I had download it from direct2drive so I could actualy play a version I could run scripts on. You guys got me hooked. Now I need to learn to script myself and I really would LOVE to have a copy of this guide. If anyone has it hidden away in some dark corner of their hard drive, or has a link to it somewhere, I would be most appreciative if you could suppy me with said files or link. PM me and I'll supply an email addy Smile Thanks in advance to anyone who can help, and a HUGE thank you to all those who have worked so hard at the scripts I'm already running in my games.

Back to top
View user's profile Send private message
rkrisher



MEDAL

Joined: 10 Jun 2008
Posts: 22 on topic

Thank you for registering your game
PostPosted: Sat, 21. Jun 08, 00:31    Post subject: Reply with quote Print

I can't find anyones e-mail address or I'd send it. I have the Linux version of X2 It came with a mod kit to extract the scripts from the archive files and place them in the right directories and two docs, one for script editing and one for Galaxy editing. They should work for you winduhhs people too.

Back to top
View user's profile Send private message Send e-mail
lutorm





Joined: 12 Nov 2008



PostPosted: Wed, 19. Nov 08, 19:49    Post subject: Reply with quote Print

Me too. You start clicking the X3TC tutorial pages to X3 tutorial to X2 tutorial and you end up looking for this guide which is the point of origin for learning about scripting. And it's gone. Can someone put it at an accessible location? Please?

Back to top
View user's profile Send private message
kel187





Joined: 22 Nov 2007
Posts: 15 on topic

Thank you for registering your game
PostPosted: Fri, 21. Nov 08, 19:17    Post subject: Reply with quote Print

lutorm wrote:
Me too. You start clicking the X3TC tutorial pages to X3 tutorial to X2 tutorial and you end up looking for this guide which is the point of origin for learning about scripting. And it's gone. Can someone put it at an accessible location? Please?


i absolutely agree with lutorm. we want to learn scripting, and instead of bothering the experienced scripters, we followed the tutorials, to find out that x3tc SE is very similar to x3r SE. and then, second aha, we found out that x3r SE is very close to x2 SE. and then you land here, where noobs as me should start, and finding nothin'.....

sorry, i'm just a lil' bit frustrated, i didnt want to offend someone, just releasing some pressure....


_________________
"79 bitte 28"
Back to top
View user's profile Send private message
baubsmyth





Joined: 05 Nov 2005
Posts: 66 on topic

Thank you for registering your game
PostPosted: Sat, 22. Nov 08, 00:54    Post subject: Reply with quote Print

The Community Plugins sticky has links to tools & documents, as well as mods & scripts. If you look at the bottom of the first post you will see that Moggy2 provides a link to "the scripting handbook at Xai Corp". Lot's of fantastic scripting info there.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Sun, 24. Jun 18, 18:12

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.09457 seconds, sql queries = 29