Raised This Month: $ Target: $400
 0% 

native server queries invalid function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 07-08-2014 , 15:32   native server queries invalid function
Reply With Quote #1

PHP Code:
public test()
{
    new 
errcode;
    new 
squery_id sq_query("127.0.0.1, 27015, SQ_Server, "SqueryResults", errcode);
    if(!squery_id)
    {
        new error[32];
        sq_error(errcode, error, charsmax(error));
        
        log_amx("
Error on querying server (%d): %s", errcode, error);
    }
}

public SQueryResults(squery_id, type, Trie:buffer, Float:query_time, bool:failed, data[], data_size)
{
    if(failed)
    {
        // no results were found for the query
        // buffer is empty and buffer_len is 0
        log_amx("
No results were found for query.");
    }
    else
    {
    new pnum
    TrieGetCell(buffer, "
num_players", pnum);
    chat_color(0, "
playeri: %d", pnum);
    }

done using This Native

And it's giving me "Invalid function handle."


Please help me , I'm doing some freelancing work and I need to query another server and get how many players is hat without the use of php
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-08-2014 , 17:15   Re: native server queries invalid function
Reply With Quote #2

SqueryResults != SQueryResults
__________________
Black Rose is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 07-08-2014 , 18:03   Re: native server queries invalid function
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
SqueryResults != SQueryResults
I can't even begin to describe how hard it is to stop myself from swearing
Thank you so much
My fault for setting notepad++ case insensitive
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Reply



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 21:07.


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