The language the makes you understand the language.
#1

Hi.


I was wondering for a few while,almost everyone on sa-mp forums script,we script pawn me too,that is a language which is C-like.

Alright,scripting itself is hard, and pawn is a language. I'll explain it this way.

Imagine the SetPlayerHealth(playerid,amount); function. It has a meaning on its own language (pawn). Well,when you use that function,it refers to the GTA-SA script (done by rockstar games) changing the actor's health variable,am I right?

So,the computer knows what to do at SetPlayerHealth. And the script of rockstar games aswell. Ex: Rockstar games is SetActorHealth (just made it up) So if you use SetPlayerHealth,it will return to SetActor health.

So someone scripted GTA-SA. Alright,then how did they script GTA-SA script? There are functions,how does the PC understand what function you used and what will it do. Does C++ understand?Then how does the PC understand C++? The electronic pulses on the motherboard? Well,how does those,turn to a god damn SetPlayerHealth function,got me? I wish you did.

If you didn't understand I'm trying to ask you,

How does the PC understand the script language? There must be another function or something different to tell the pc what to do at that function and how will pc understand that function is that function.

It is like a paradox,isnt it?
Reply
#2

So you eat a apple.But the apple it's from a tree,and tree from a seed.and you eat apple's seed to(not really).
That's how the world turns.around'n'around.
Also, Gta use Windows libraries,and Windows libraries are based on ASM,and asm is cpu language,and cpu language..is what it is.
The world is bigger than you think.
Reply
#3

Quote:
Originally Posted by FarSe.
Посмотреть сообщение
So you eat a apple.But the apple it's from a tree,and tree from a seed.and you eat apple's seed to(not really).
That's how the world turns.around'n'around.
Also, Gta use Windows libraries,and Windows libraries are based on ASM,and asm is cpu language,and cpu language..is what it is.
The world is bigger than you think.
...And you poop the apple.

Ps. Got it now. Thanks
Reply
#4

There are some flaws in your theory though. For example SA-MP does not use built in functions as they're unreachable as GTA-SA is closed source. Therefor SAMP reads and changes memory adresses (http://en.wikipedia.org/wiki/Memory_address), they have been obtained through reverse engineering (http://en.wikipedia.org/wiki/Reverse_engineering) say that adress A links to the player's health, this is what the SAMP server changes, it does not call any function. This is also how cheats work and that's why SAMP is sometimes considerd a cheating tool by (badd) virus scanners.

As far as programming languages go, an OS is made up out of different levels, you have low and high levels. An example of a high level programming language is C++ an example of a low level language would be Assembly (http://en.wikipedia.org/wiki/Assembly_language). Because programming in ASM is hard and most of the time limited to only a certain type of CPU we have high level languages which make it much easier to write code that is independed from a certain type of CPU and even OS independend we call this cross-platform programming.(http://en.wikipedia.org/wiki/Cross-platform).

When you look at software interaction with hardware it is actually extremely easy and yet very, very complicated. I don't really have time to go into it right now but someone else might.

**if I made any mistakes in my post, feel free to correct me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)