Raised This Month: $ Target: $400
 0% 

globals int and other


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
datasource
New Member
Join Date: Jun 2013
Old 12-28-2013 , 14:50   globals int and other
Reply With Quote #1

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
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

Last edited by datasource; 12-28-2013 at 14:53. Reason: Mistakes
datasource is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-28-2013 , 15:32   Re: globals int and other
Reply With Quote #2

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.
__________________

Last edited by fysiks; 12-28-2013 at 15:33.
fysiks is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-29-2013 , 06:11   Re: globals int and other
Reply With Quote #3

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.
Backstabnoob is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode