View Single Post
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 04-15-2010 , 10:27   Re: [INC] GeoCity (Get Players City From IP)
Reply With Quote #4

2. Its described in the wiki
Quote:
Originally Posted by wiki
By default, all variables in Pawn are initialized to zero. If there is an explicit initializer, the variable is initialized to the expression after the = token. At a local scope, this can be a run-time expense. The decl keyword (which is only valid at local scope) was introduced to let users decide if they want variables initialized or not.
Basically, leaving variables uninitialized (when it doesnt matter) is faster

3. Nah, queries can be local. You should check if there already is an existing connection before opening a new one (referring to GeoDatabaseConnect())

4. Yeah I can imagine, your current implementation is not the most cleanest either, but I dont know nor can I be bothered to think of a better way . The best advice I can probably give you is to check out the wiki article, or see other plugins that use threaded queries. I wasnt really asking for threaded query support though, just thought it would be nice
__________________
plop

Last edited by p3tsin; 04-15-2010 at 10:29.
p3tsin is offline