globals int and other
Hi there. How can i found something like gExample g_Example iExample and other tutorials? I can't find them... Cuz I started to programing with pawn and stuck with these stuff... Need to learn as much as I can :D
Edit: Maybe not correctly written but what I wanted to know when and how to use these things. I know like g_Hello is global and ech... szExample is string if correct but what other means?> Need help :) |
Re: globals int and other
The name of the variable is irrelevant. If it is declared outside of a function, it is a global variable and can be used everywhere in that plugin. The "sz" generally refers to a zero-terminated string but just naming it with the "sz" does not make it a string. It has to be an array. You should look at the copious number of tutorials available for beginners before asking such trivial questions.
|
Re: globals int and other
As fysiks stated, the name of the variable is up to you. Giving the variables proper prefix makes your code more readable, though, as all variables are initialized the same way and it can be confusing to find out what variable holds what type of data.
You're clearly a beginner, so it might be a good advice to name the variables right from the beginning, it can also speed your learning curve a bit up. But it's all up to you. |
| All times are GMT -4. The time now is 10:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.