Raised This Month: $ Target: $400
 0% 

amxxpc.exe keep on compiling without compiling the output file(?)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 06-12-2014 , 03:56   amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #1

When I compile this:
Code:
#define QUERY_UPDATE_SKILLS "INSERT INTO %s (uniqueid) VALUES ('%s') ON DUPLICATE KEY UPDATE authid ='%s',ip='%s',nick='%s',xp='%d',playerlevel='%d',skillpoints='%d',medals='%d',health='%d',armor='%d',rhealth='%d',rarmor='%d',rammo='%d',gravity='%d',speed='%d',dist='%d',dodge='%d SET `lastUpdated`=now()'" new c_Cache[1024]; formatex( g_Cache, 1023, QUERY_UPDATE_SKILLS, sql_table, nickname, authid, ip, nickname, xp[id], playerlevel[id], skillpoints[id], medals[id], health[id], armor[id], rhealth[id], rarmor[id], rammo[id], gravity[id], speed[id], dist[id], dodge[id], where_statement );
It just continue trying to compile the plugin without finishing it, while amxxpc.exe consuming from 12-13% of the processor constantly.
Rirre is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-12-2014 , 04:23   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #2

I recall a previous discussion on the same thing and I think it had to do with the line being too long. Try breaking it up into multiple formatex calls
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-12-2014 , 06:06   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #3

it should spout out a "code unreachable" error, ya sure it doesn't?
aron9forever is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-12-2014 , 07:30   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #4

Unreachable code errors result from constructs like this:

PHP Code:
somefunction() {
   return;

   new 
1;
   
// ...

This is probably a compiler limitation or bug, just as YamiKaitou suspects. Try splitting this statement up into multiple format(ex) statements.
__________________
In Flames we trust!
Nextra is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-12-2014 , 09:21   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #5

Quote:
Originally Posted by Nextra View Post
Unreachable code errors result from constructs like this:

PHP Code:
somefunction() {
   return;

   new 
1;
   
// ...

This is probably a compiler limitation or bug, just as YamiKaitou suspects. Try splitting this statement up into multiple format(ex) statements.
I've recalled badly then, I was thinking about non terminated strings because of this

it's right, the line is too long, just add some newlines, it won't mess up the query
aron9forever is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 06-12-2014 , 09:23   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
I recall a previous discussion on the same thing and I think it had to do with the line being too long. Try breaking it up into multiple formatex calls
Do not work either :/
Code:
        new pos;         pos += formatex( g_Cache[pos], charsmax(g_Cache)-pos-1, QUERY_UPDATE_SKILLS, sql_table, nickname, authid, ip, nickname, xp[id], playerlevel[id], skillpoints[id], medals[id], health[id], armor[id], rhealth[id], rarmor[id], rammo[id], gravity[id], speed[id], dist[id], dodge[id], where_statement );         pos += formatex( g_Cache[pos], charsmax(g_Cache)-pos-1, "SET `lastUpdated`=now()" );

My only option is to do this then?
Code:
    new g_Cache2[1024]; // update lastUpdated     formatex( g_Cache2, 1023, "UPDATE %s SET `lastUpdated`=now()", sql_table );

Last edited by Rirre; 06-12-2014 at 09:46.
Rirre is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-12-2014 , 19:15   Re: amxxpc.exe keep on compiling without compiling the output file(?)
Reply With Quote #7

Quote:
Originally Posted by Rirre View Post
Do not work either :/
Code:
        new pos;         pos += formatex( g_Cache[pos], charsmax(g_Cache)-pos-1, QUERY_UPDATE_SKILLS, sql_table, nickname, authid, ip, nickname, xp[id], playerlevel[id], skillpoints[id], medals[id], health[id], armor[id], rhealth[id], rarmor[id], rammo[id], gravity[id], speed[id], dist[id], dodge[id], where_statement );         pos += formatex( g_Cache[pos], charsmax(g_Cache)-pos-1, "SET `lastUpdated`=now()" );

My only option is to do this then?
Code:
    new g_Cache2[1024]; // update lastUpdated     formatex( g_Cache2, 1023, "UPDATE %s SET `lastUpdated`=now()", sql_table );
Your line is still too long then. Break QUERY_UPDATE_SKILLS into 2 parts and try it again.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 09:47.


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