Questions about related to pawno
#1

So I learned scripting lately and I know how to work on simple functions in scripts but I would like to improve my knowledge in scripting so I have a few questions and I would appreciate detailed answers, Thank you.

What's the difference between naked, stock or public functions?
There is an error in pawn compiler about shadowed variables what does it mean?
What is the data type used by pawn?
How to iterate through an array?
Reply
#2

Quote:
Originally Posted by KevinKush
Посмотреть сообщение
What's the difference between naked, stock or public functions?
naked functions have to get used. Otherwise you get an error.
You cant call naked functions with an timer or CallLocalFunction/Remote.
And they can return strings.

stock is used for, that if you dont use this function, the compiler ignores ist

public functions, has to be used, cant return strings, and can called by timer and CallLocalFunction/Remote.
Quote:
Originally Posted by KevinKush
Посмотреть сообщение
There is an error in pawn compiler about shadowed variables what does it mean?
This means you have a variable before declared with the same name

Quote:
Originally Posted by KevinKush
Посмотреть сообщение
What is the data type used by pawn?
if you do:

PHP код:
new x
This means x is an Integer

Quote:
Originally Posted by KevinKush
Посмотреть сообщение
How to iterate through an array?
PHP код:
new tmp[] = {1,2,3,4,5};
for(new 
ii<sizeof(tmp); i++)
{
    
printf("%d",tmp[i]); //Gives you: 1...2...3...4...5

You should look in C language, cause they are very smiliar
Reply
#3

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
.........
These are the answers I'm looking for, thank you for your help and your time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)