AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run Time Error 10 (https://forums.alliedmods.net/showthread.php?t=98514)

ProIcons 07-26-2009 06:27

Run Time Error 10
 
PHP Code:

new players[32], pnumtempid;
    
get_players(playerspnum);
    for( new 
ii<pnumi++ )
    {
       
tempid players[i];
       new 
Player[32]
       
get_user_name(tempid,Player,31)
       
query SQL_PrepareQuery(con2"SELECT * FROM players WHERE username='%s'",Player)
       
SQL_Execute(query)
       
SQL_NextRow(query)
       new 
kills SQL_ReadResult(query3)
       new 
deaths SQL_ReadResult(query4)
       
set_hudmessage(255170420.10.000.199999.00.00.0534)
       
show_hudmessage(tempid"Kills: %s ^n   Deaths: %s",kills,deaths)
    } 

Quote:

L 07/26/2009 - 13:27:09: [MySQL] No result set in this query!
L 07/26/2009 - 13:27:09: [AMXX] Run time error 10 (plugin "gather.amxx") (native "SQL_NextRow") - debug not enabled!

dorin2oo7 07-26-2009 06:36

Re: Run Time Error 10
 
first enable debug by adding debug word after the plugin name in plugins.ini then post the error !

ProIcons 07-26-2009 07:26

Re: Run Time Error 10
 
Quote:

L 07/26/2009 - 14:26:28: [AMXX] Displaying debug trace (plugin "gather.amxx")
L 07/26/2009 - 14:26:28: [AMXX] Run time error 10: native error (native "SQL_NextRow")
L 07/26/2009 - 14:26:28: [AMXX] [0] Gather.sma::show_msg (line 841)
L 07/26/2009 - 14:26:29: [MySQL] No result set in this query!

dorin2oo7 07-28-2009 09:45

Re: Run Time Error 10
 
can you post gather.sma to check the error line !!!?

MrOpposite 07-28-2009 09:50

Re: Run Time Error 10
 
PHP Code:

new players[32], pnumtempid;
    
get_players(playerspnum);
    for( new 
ii<pnumi++ )
    {
       
tempid players[i];
       new 
Player[32]
       
get_user_name(tempid,Player,31)
       
query SQL_PrepareQuery(con2"SELECT * FROM players WHERE username='%s'",Player)
       
SQL_Execute(query)
       
SQL_NextRow(query//THIS IS THE ROW
       
new kills SQL_ReadResult(query3)
       new 
deaths SQL_ReadResult(query4)
       
set_hudmessage(255170420.10.000.199999.00.00.0534)
       
show_hudmessage(tempid"Kills: %s ^n   Deaths: %s",kills,deaths)
    } 

That is based of the error message...

EDIT:
We still need much more of the source though

dorin2oo7 07-29-2009 09:21

Re: Run Time Error 10
 
Quote:

Originally Posted by MrOpposite (Post 883892)
PHP Code:

new players[32], pnumtempid;
    
get_players(playerspnum);
    for( new 
ii<pnumi++ )
    {
       
tempid players[i];
       new 
Player[32]
       
get_user_name(tempid,Player,31)
       
query SQL_PrepareQuery(con2"SELECT * FROM players WHERE username='%s'",Player)
       
SQL_Execute(query)
       
SQL_NextRow(query//THIS IS THE ROW
       
new kills SQL_ReadResult(query3)
       new 
deaths SQL_ReadResult(query4)
       
set_hudmessage(255170420.10.000.199999.00.00.0534)
       
show_hudmessage(tempid"Kills: %s ^n   Deaths: %s",kills,deaths)
    } 

That is based of the error message...

EDIT:
We still need much more of the source though

as you se in your error :arrow: L 07/26/2009 - 14:26:28: [AMXX] [0] Gather.sma::show_msg (line 841) i need all *.sma to find line 841 that contains the error. As you posted above is not that much lines !!!

Bugsy 07-29-2009 09:45

Re: Run Time Error 10
 
PHP Code:

show_hudmessage(tempid"Kills: %s ^n   Deaths: %s",kills,deaths

Not the cause of this error but you should be using %d for integers, %s is for strings.


All times are GMT -4. The time now is 18:24.

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