Becoming a Better Scripter
#1

Before we get started, I would like to say a quick word about myself. I am capable of scripting just about anything realistically necessary for a SA-MP server at this point in time (or rather the majority of things).

That being said, I am looking to gain a more "fundamental" knowledge of scripting for SA-MP. I have no other programming experience except for Pawn.

I have found that Pawn is a "C-like Scripting Language." If I want to learn more about the basics/syntax of Pawn, should I learn about C? If so, are we just talking about C or C#, C++, etc. I'm not really sure how to tell what I should be learning.

Also, if you already happen to know some good resources to gain a better understanding of the fundamentals of programming in a C-Like scripting language please let me know!
Reply
#2

I'm probably wrong about this, but I believe C# is the closest C-language to PAWN (out of C, C# and C++ that is).
Reply
#3

C# and C++ are object orientated, C is the one similar to pawn, just similar, if you want to become a better scripter to script with pawn, just learn about pawn, C has plenty of things pawn doesnt have and never could be used on pawn, but yeah i suggest you learn C++ if you have time, you will understand many things and depending from where you learn C++ you could probably improve your scripting.
Reply
#4

If you want to learn more about Pawn, read the Pawn documentation. Despite it being like C, it is a separate language.
Reply
#5

Like I mentioned earlier, I have a general understanding of Pawn (and I can script almost anything in it). The real information I'm looking to learn are the basics of the language itself. For example, I feel like I should be able to answer the questions below:

What do the compiler flags "-d", "-O", and "-a" do?

When would "static stock const" be appropriate as a symbol declaration?

I wish to run two different pieces of code, each once per second. Should they be combined in to a single timer, run as two separate timers, or done in some other manner? Explain your answer.

Give two reasons why a macro might be used instead of a function, and two reasons why a function might be more appropriate.

-------------------------------------

What would be the best way to learn how to answer questions like this?
Reply
#6

Quote:
Originally Posted by TKZ227
Посмотреть сообщение
.........

-------------------------------------

What would be the best way to learn how to answer questions like this?
Experience and self-understanding, study the pawn language, understand everything about it abstarct machine and the language itself, read and understand the pawn documentation just that, i know C, C++, java, assembly 8086 ..., ProLog .. but i never mastered pawn itself, so if your main goal is learn pawn then study pawn, if you wanna learn to program in any other language buy a book.
Reply
#7

Quote:
Originally Posted by kirk
Посмотреть сообщение
Experience and self-understanding, study the pawn language, understand everything about it abstarct machine and the language itself, read and understand the pawn documentation just that, i know C, C++, java, assembly 8086 ..., ProLog .. but i never mastered pawn itself, so if your main goal is learn pawn then study pawn, if you wanna learn to program in any other language buy a book.
So do you need to do this sort of thing with every language? Will learning the Pawn language in depth make learning C++ any easier in the future?
Reply
#8

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I'm probably wrong about this, but I believe C# is the closest C-language to PAWN (out of C, C# and C++ that is).
I believe you are in fact wrong here. C is closest to Pawn. C# incorporates classes and namespaces and the likes...
Reply
#9

Quote:
Originally Posted by SchurmanCQC
Посмотреть сообщение
I believe you are in fact wrong here. C is closest to Pawn. C# incorporates classes and namespaces and the likes...
Figured as much!
Reply
#10

Quote:
Originally Posted by TKZ227
Посмотреть сообщение
So do you need to do this sort of thing with every language? Will learning the Pawn language in depth make learning C++ any easier in the future?
Yes it would make it a bit easier, but its not the same anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)