SA-MP Forums Archive
Question. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question. (/showthread.php?tid=499039)



Question. - SPA - 06.03.2014

Hi,
When i add includes which include a string defined and add it in my gm #include <example> its gives me warning that string must be changed to another name like string2[256]; why everytime i must to change the value or the definition of string?


Re: Question. - Misiur - 06.03.2014

Well, the includes should take care of not leaking their scope. Which exactly do you have in mind?


Re: Question. - SPA - 06.03.2014

ah fixes.inc by ******


Re: Question. - Misiur - 06.03.2014

Oh, yeah, so it's your fault then. A global variable is a variable which is created outside any function (usually near top of the script). You should mark those as global, using some common practice like prefixing names with "g". So, gString.


Re: Question. - SPA - 06.03.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Oh, yeah, so it's your fault then. A global variable is a variable which is created outside any function (usually near top of the script). You should mark those as global, using some common practice like prefixing names with "g". So, gString.
Yeah thanks , but I dont recommend to use fixes.inc anymore its bug the dialogs , for example when someone connect to server they dont see the dialog of login.


Re: Question. - Misiur - 06.03.2014

https://sampforum.blast.hk/showthread.php?tid=292813 - you can disable any fix you want. But maybe there is some reason why they don't show? Who knows. Good luck with your scripting!


Re: Question. - SPA - 06.03.2014

Ammmmmmm well maybe thanks for help +rep!