Home   Help Search Login Register  

Author Topic: script language  (Read 1087 times)

0 Members and 2 Guests are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
script language
« on: 17 Oct 2004, 06:35:28 »
I have liked learning how to script from everyone on this site. Although I am still a hack I was wondering what computer language is the scripts written in. I would like to pick up a book that would teach me more if possible.


thanks
"Everyone dies so deal with it and move on"

                                                      ME

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:script language
« Reply #1 on: 17 Oct 2004, 10:52:07 »
I find it best to treat it as a language all of its own.  

I have written programs in: algol; fortran; 6502 assembler; pascal; modula2; Basic; Visual Basic; C; Reverse Polish; Logo; MSDOS batchfiles; plus some I may have forgotten about.  Several of them in various different dialects.  It is none of these.

The program flow is like Basic - but reading a book Basic will not help you I am afraid
« Last Edit: 17 Oct 2004, 10:52:56 by THobson »

Kaliyuga

  • Guest
Re:script language
« Reply #2 on: 17 Oct 2004, 12:30:18 »
 I've never been the greatest at scripting .. but our editor's depot definately has some great tutorials on the subject..

http://www.ofpec.com/editors/browse.php?category=1_3

I've heard alot of people say good things about Johan Gustafsson's scripting guide.

:cheers:

Offline sim

  • Members
  • *
  • Hot! Real hot! Damn Hot!
Re:script language
« Reply #3 on: 17 Oct 2004, 13:59:33 »
I do believe and have heard a lot of people say that the language is similar to C++...

 :)

sim
The Unsung Campaign Team Leader

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:script language
« Reply #4 on: 17 Oct 2004, 15:42:55 »
mission.sqs certainly has a lot of similarities with C++.  In fact it may well be written in C++, but the scripts we write are nothing like.
« Last Edit: 17 Oct 2004, 15:44:46 by THobson »

Offline sim

  • Members
  • *
  • Hot! Real hot! Damn Hot!
Re:script language
« Reply #5 on: 17 Oct 2004, 16:23:11 »
They arn't?

How come Johan in his scripting tutorial keeps saying a lot of it is similar to C++?

like AND = &&?

and OR = ||?

 :P
I'm not saying your wrong, I'm just going on what I've read.

sim
The Unsung Campaign Team Leader

Offline KTottE

  • Former Staff
  • ****
Re:script language
« Reply #6 on: 17 Oct 2004, 16:32:55 »
A lot of programming languages use the same logical operators, && for AND, || for OR, == for equals, != for not equals and so on.

The OFP script language is completely proprietary, and although it shares similiarities with other programming- and script-languages it is, like THobson says nothing like them.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:script language
« Reply #7 on: 17 Oct 2004, 18:20:33 »
As KTottE says, a lot of languages share many similarities, but that does not make them the same.  This is a C++ program that prints the word "Hello" 5 times, each on a new line.
Code: [Select]
#include <iostream.h>
void main()
}
         int counter;
         for (counter = 0; counter <5;counter++)
              cout << "\nHello.";
}
About the only similarity that this has with OFP scripting language is the use of \n to represent a new line.

Offline sim

  • Members
  • *
  • Hot! Real hot! Damn Hot!
Re:script language
« Reply #8 on: 17 Oct 2004, 20:37:07 »
Ok, lol.

I appologise. You win  :P
The Unsung Campaign Team Leader

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:script language
« Reply #9 on: 17 Oct 2004, 20:40:29 »
Absolutely no need to apologise
« Last Edit: 17 Oct 2004, 22:27:52 by THobson »

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:script language
« Reply #10 on: 20 Oct 2004, 00:03:21 »
The "mission.sqm" kind of looks like JScript.
--Ben

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:script language
« Reply #11 on: 20 Oct 2004, 06:57:56 »
So In the end I guess Scripting is every language and no language all rolled into one.   :-\

I guess I will continue to learn from other people's scripts and this great site.
"Everyone dies so deal with it and move on"

                                                      ME

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:script language
« Reply #12 on: 20 Oct 2004, 09:49:35 »
OFP script is a language unto itself...

The big mistakes are made when the script0r assumes it behaves like Basic, or C++ or pascal or something.
OFP is OFP... ::)

Personally, I learned to program in basic a long, long long time ago (which could be considered a handicap, depending who you talk to ;D). There are many similarities, but assuming they are the same will get you caught out when your script stops working :P