AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]code or compiler bug/problem? (https://forums.alliedmods.net/showthread.php?t=155930)

One 04-28-2011 11:13

[SOLVED]code or compiler bug/problem?
 
1 Attachment(s)
attached Pic.

can anyone check my code pls?

o,O
PHP Code:

/*

- Linie 543:

Ganzes System mit "CSTS_ARE_CATCHER" geändert
Godmode geändert

- Linie 310:

get_user_team -> cs_get_user_team
client_print(0,print_chat,"[ %s %s ] X Team won this round weg

Im Init:

ResetHUD weg

Ganzer Code:

Speed_settings(id) weg
Prethink weg

Neu:

Win Sounds

Check curweapon vs Ham :
public Player_ResetMaxSpeed(id)
{
    if(is_user_alive(id) //&& get_user_maxspeed(id) != 1.0) // check if player is freezed
    {
        set_user_maxspeed(id, float:XXX)
    }
}
#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1)



RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "BlockKnife");


Line 640 :

if(!is_user_alive(i))
{
    ShowSyncHudMsg(i, SyncHud, "Speed : %f",speed)
}
// Check as Spec for real speed.

line 616 ( render ) -> check for team to change the render.

if( alive users <= 2)
{
    block kill
}


if check in speed function.
if(alive)
...
else

*/
/*
TODO LIST


REMOVE SMITYP TO GAMETYP ( TRAINING OR NORMAL ) BY NORMAL SEMITYP = 2
Turbo mods
Semiclip
Traininmod
Walljump
Trail
Keyspy
Menu
Welcome menu
Trainingmod
buyzone
anticamp
turbo für catcher 
render change by speed ( test )
entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 1.0) -> 1.0 or 0.1 ( FREQ ) <- must be checked.
AG ANZAHL ändern
if orpheu is running
...
*/
/*
DID LIST

teamchange fix
Touch
Touched score -1
godmode
render cvars
test the score
catch teams
spec speed
überleben punkte
Speedometer ( test ) ( spec )
AG test
turbo chilldown time CVAR

*/
/*
Included 

Speedometer by AciD

*/
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <screenfade_util>
#include <dhudmessage>
#include <round_terminator>
#include <cvar_util>
#include <sqlx> 

#define PLUGIN "Catchmod Gold Edition"
#define VERSION "1.0.19"
#define AUTHOR "Dr.One"
#define FREQ 0.1
#define IsPlayer(%1)     (1 <= %1 <= E_MaxPlayers)
#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
#define MAX_PLAYERS             32 + 1
#define m_pPlayer 41
#define XO_WEAPON 4
#define DISTANCE 120
#define QUERY_CREATE_TABLE "CREATE TABLE IF NOT EXISTS `catchmod` ( \
         
`authidVARCHAR32 NOT NULL, \
         `
rankINTNOT NULL, \
         `
nameVARCHAR32 NOT NULL, \
         `
AGsINTNOT NULL, \
         `
maxspeedINT12 NOT NULL, \
    `
mapVARCHAR32 NOT NULL, \
    `
catchedINTNOT NULL, \
    `
catchsINTNOT NULL, \
    `
fpsINTNOT NULL, \
    `
survivesINTNOT NULL, \
    `
flaggedINTNOT NULL, \
    `
now_mapVARCHAR32 NOT NULL, \
    `
now_maxspeedVARCHAR32 NOT NULL, \
    `
now_VARCHAR32 NOT NULL, \
         
PRIMARY KEY ( `authid` ) );"

/*
MAIN HANDELS
*/
new round_counter = 1
new CSTS_ARE_CATCHER
new user_is_catcher[33]
new TURBO[33][2]
new E_MaxPlayers
new chilldown[33]
new SyncHud
new over_tausend[33]
new under_tausend[33]
new over_twotausend[33]
new winmsg[32]
new iconstatus
new score[33][4]
new deathMsg
new scoreMsg
new points[2]
new round_ednded
new fleer_win
new g_iEntClassName[] = "
speedometer_think"
new const SOUND_CATCHER_WIN[] = "
misc/applause.wav"
new const SOUND_FLEER_WIN[] = "
misc/applause.wav"
new const SOUND_CATCHER_WIN_DEFAULT[] = "
events/task_complete.wav"
new const SOUND_FLEER_WIN_DEFAULT[] = "
events/task_complete.wav"
new const SOUND_CATCHER_LOSE[] = "
misc/looser.wav"
new const SOUND_FLEER_LOSE[] = "
misc/looser.wav"
new const SOUND_CATCHER_LOSE_DEFAULT[] = "
events/friend_died.wav"
new const SOUND_FLEER_LOSE_DEFAULT[] = "
events/friend_died.wav"
new users_AG[33]
new AG_anzahl[33][8]
new corrent_AG[33]
new AG_loop[33]
static Float:users_maxspeed_round[33]
static Float:users_maxspeed_map[33]
static Float:best_speed
new top_speed_name[33]
new g_iIsSpectator[MAX_PLAYERS]
new g_points[MAX_PLAYERS]
new g_speed[MAX_PLAYERS]
new dead_fixed_icon[33]
new turbo_used[33]
enum 
{
    R,
    G,
    B
}
new fix_task = 0
new users_team[33]
new bool:Solid[33]
new bool:user_has_semi[33]
new Float:Origin[33][3]
new Prethink
new Postthink
new Fullpack
new Handle:sqldb
new sql_ERROR[512]
/*
CVARS
*/
new CV_Semityp
new CV_Semitrynsparenty
new CV_catchers_speed
new CV_Bonnyhop
new CV_Turbo_Usage_Percent
new CV_Turbo_Usage_Time
new CV_Catch_speed
new CV_Catch_fleer_speed
new CV_Catch_Turbo_speed
new CV_Catch_Points
new CV_Catchers_Color
new CV_Catcher_Color_R
new CV_Catcher_Color_G
new CV_Catcher_Color_B
new CV_Fleer_Color
new CV_FLEER_Color_R
new CV_FLEER_Color_G
new CV_FLEER_Color_B
new CV_Speedometer_Color
new CV_Speedo_R
new CV_Speedo_G
new CV_Speedo_B
new CV_render_amount
new CV_render_amount_U
new CV_render_amount_O
new CV_render_amount_OO
new CV_survivor
new CV_AG_TURBO
new CV_CHILLDOWN_TIME
new CV_CUSTOM_SOUND
new CV_Turbo_fade
new CV_AMXSUPER_FIX
new CV_Turbo_fade_STR[3]

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_logevent("
newRound",2,"0=World triggered", "1=Round_Start")
    RegisterHam( Ham_Spawn, "
player","Players_Spawn",1)
    set_task(3.0,"
Show_Stats",6000,"",0,"ab")
    register_touch("
player","player","touch")
    register_touch("
trigger_multiple", "player", "Forward_TriggerMultipleTouch" )
    RegisterHam(Ham_Weapon_SecondaryAttack, "
weapon_knife", "secund_attack")
    RegisterHam(Ham_Weapon_PrimaryAttack, "
weapon_knife", "primary_attack")
    RegisterHam(Ham_Item_Deploy, "
weapon_knife", "knife_weapon_change", 1)
    RegisterHam(Ham_Player_Jump, "
player", "bunnyhop")
    RegisterHam(Ham_Player_ResetMaxSpeed, "
player", "Speed_settings", 1)
    RegisterHam(Ham_AddPlayerItem, "
player", "Player_AddPlayerItem")
    register_logevent("
endround",2,"0=World triggered","1=Round_End")
    register_event("
TextMsg","game_comencing","a","2&#Game_C")
    
register_event("TextMsg""game_comencing""a""2=#Game_will_restart_in")
    
register_clcmd"say","Say_Command")
    
register_clcmd"say_team","Say_Command")
    
register_dictionary("catchmod.txt")
    
/*
    Speedometer Fixed by Vato
    */
    
register_think(g_iEntClassName"fw_ThinkEntity")
    new 
iEnt create_entity("info_target")
    
entity_set_string(iEntEV_SZ_classnameg_iEntClassName)
    
entity_set_float(iEntEV_FL_nextthinkget_gametime() + 1.0)
    
register_event("SpecHealth2""ev_SpecHealth2""bd")
    
    
E_MaxPlayers get_maxplayers()
    
SyncHud CreateHudSyncObj()
    
iconstatus get_user_msgid("StatusIcon")
    
register_event("SendAudio""play_win_sound""a""2&%!MRAD_terwin")
    
register_event("SendAudio""play_win_sound""a""2&%!MRAD_ctwin")
    
register_message(get_user_msgid("TextMsg"), "message_textmsg")
    
deathMsg get_user_msgid("DeathMsg")
    
scoreMsg get_user_msgid("ScoreInfo")
    
set_task10.0"RestartRound" )
    
/*
    CVARS
    */
    
CV_catchers_speed register_cvar("amx_catch_catchers_speed","1.0")
    
CV_Bonnyhop register_cvar("amx_catch_bunnyhop","1")
    
CV_Turbo_Usage_Percent register_cvar("amx_catch_turbo_percent","10")
    
CV_Turbo_Usage_Time register_cvar("amx_catch_turbo_usage_time","0.25")
    
CV_Catch_speed register_cvar("amx_catch_speed","2.0")
    
CV_Catch_fleer_speed register_cvar("amx_catch_fleer_speed","1.0")
    
CV_Catch_Turbo_speed register_cvar("amx_catch_turbo_speed","1.5")
    
CV_Catch_Points register_cvar("amx_catch_points","3")
    
CV_Speedometer_Color register_cvar("amx_catch_speed_colors""255 255 255")
    
CV_Catchers_Color register_cvar("amx_catcher_colors""255 000 000")
    
CV_Fleer_Color register_cvar("amx_fleer_colors","000 255 000")
    
CV_render_amount register_cvar("amx_render_amount","25 50 125")
    
CV_survivor register_cvar("amx_survivor_points","1")
    
CV_AG_TURBO register_cvar("amx_turbo_AG","10")
    
CV_CHILLDOWN_TIME register_cvar("amx_chilldown_time","3.0")
    
CV_CUSTOM_SOUND register_cvar("amx_customwinsound","1")
    
CV_Turbo_fade register_cvar("amx_turbo_fade_color","0 0 150")
    
CV_AMXSUPER_FIX register_cvar("amx_amxsuper_fix","1")
    new 
handleCvar CvarRegister"amx_semiclip_enabled""1");
    
CvarHookChangehandleCvar"SemiclipCvar" );
    
    
toggleForward( .enable true );
    
CV_Semityp register_cvar"amx_semiclip_typ""0" )
    
CV_Semitrynsparenty register_cvar"amx_semiclip_transparancy""1" )
    
    new 
speedo_colors[16], speedo_red[4], speedo_green[4], speedo_blue[4]
    
get_pcvar_string(CV_Speedometer_Colorspeedo_colorssizeof speedo_colors 1)
    
parse(speedo_colorsspeedo_red3speedo_green3speedo_blue3)
    
CV_Speedo_R str_to_num(speedo_red)
    
CV_Speedo_G str_to_num(speedo_green)
    
CV_Speedo_B str_to_num(speedo_blue)
    
    
    new 
catchers_color[16],catchers_r[4], catchers_g[4], catchers_b[4]
    
get_pcvar_string(CV_Catchers_Colorcatchers_color,sizeof catchers_color -)
    
parse(catchers_color,catchers_r3catchers_g3catchers_b3)
    
CV_Catcher_Color_R str_to_num(catchers_r)
    
CV_Catcher_Color_G str_to_num(catchers_g)
    
CV_Catcher_Color_B str_to_num(catchers_b)
    
    new 
fleer_color[16],fleer_r[4], fleer_g[4], fleer_b[4]
    
get_pcvar_string(CV_Fleer_Colorfleer_color,sizeof fleer_color -)
    
parse(fleer_color,fleer_r3fleer_g3fleer_b3)
    
CV_FLEER_Color_R str_to_num(fleer_r)
    
CV_FLEER_Color_G str_to_num(fleer_g)
    
CV_FLEER_Color_B str_to_num(fleer_b)
    
    
    new 
turbo_fadecolor[16], turbo_fade_r[4], turbo_fade_g[4], turbo_fade_b[4]
    
get_pcvar_string(CV_Turbo_fade,turbo_fadecolor,sizeof turbo_fadecolor -1)
    
parse(turbo_fadecolorturbo_fade_r3,turbo_fade_g3,turbo_fade_b3)
    
CV_Turbo_fade_STR[R] = str_to_num(turbo_fade_r)
    
CV_Turbo_fade_STR[G] = str_to_num(turbo_fade_g)
    
CV_Turbo_fade_STR[b] = str_to_num(turbo_fade_b)
    
    
    new 
render_amm[16],render_am_U[4],render_am_O[4],render_am_OO[4]
    
get_pcvar_string(CV_render_amount,render_amm,sizeof render_amm -1)
    
parse(render_amm,render_am_U,3,render_am_O,3,render_am_OO,3)
    
CV_render_amount_U str_to_num(render_am_U)
    
CV_render_amount_O str_to_num(render_am_O)
    
CV_render_amount_OO str_to_num(render_am_OO)
    
    
}
public 
Say_Command(id)
{
    static 
say_args[64]
    
read_args(say_argscharsmax(say_args))
    
remove_quotes(say_args)
    
    if(
say_args[0] != '/')
    {
        return 
PLUGIN_CONTINUE
    
}
    if(
equali(say_args"/install") || equali(say_args"/installdb"))
    {
        if(
get_user_flags(id) & ADMIN_KICK)
        {
            
install_db(id)
        }
        else
        {
            
ChatColor(id"%L"LANG_PLAYER,"ERROR_NOT_ALLOWDED"PLUGIN)
        }
    }
    return 
PLUGIN_CONTINUE
}
public 
install_db(id)
{
    new 
host[64], user[64], pass[64], db[64]
    
get_cvar_string("amx_sql_host"host63)
    
get_cvar_string("amx_sql_user"user63)
    
get_cvar_string("amx_sql_pass"pass63)
    
get_cvar_string("amx_sql_db"db63)
    
sqldb SQL_MakeDbTuple(hostuserpassdb)
    new 
ErrorCode,Handle:SqlConnection SQL_Connect(sqldb,ErrorCode,sql_ERROR,charsmax(sql_ERROR))
    if(
SqlConnection == Empty_Handle)
    {
        
set_fail_state(sql_ERROR)
    }
    new 
Handle:Queries
    Queries 
SQL_PrepareQuery(SqlConnection,QUERY_CREATE_TABLE)
    
    if(!
SQL_Execute(Queries))
    {
        
SQL_QueryError(Queries,sql_ERROR,charsmax(sql_ERROR))
        
set_fail_state(sql_ERROR)
        
ChatColor(id"%L"LANG_PLAYER,"ERROR_FAILED_INSTALL"PLUGIN)
    }
    else
    {
        
ChatColor(id"%L"LANG_PLAYER,"SQL_INSTALLED"PLUGIN)
    }
    
SQL_FreeHandle(Queries)
    
SQL_FreeHandle(SqlConnection)
}
public 
plugin_end()
{
    
SQL_FreeHandle(sqldb)
}    
    
    
    
    
    
    
    
    
    
    
public 
SemiclipCvar( const handleCvar, const oldValue[], const newValue[], const cvarName[] )
{
    
toggleForward( .enable newValue] == '1' );
}
toggleForward( const bool:enable )
{
    if( 
enable
    {
        
Prethink  register_forwardFM_PlayerPreThink"PreThink" );
        
Postthink register_forwardFM_PlayerPostThink"PostThink" );
        
Fullpack  register_forwardFM_AddToFullPack"Fullpack_Post");
    }
    else
    {
        
unregister_forwardFM_PlayerPreThinkPrethink );
        
unregister_forwardFM_PlayerPostThinkPostthink );
        
unregister_forwardFM_AddToFullPackFullpack);
    }
}
public 
PreThink(plr)
{
    static 
idlast_think

    
if(last_think plr)
    {
        for(
id 1;id <= E_MaxPlayers;id++ )
        {
            if(
is_user_alive(id))
            {
                if(
get_pcvar_num(CV_Semityp))
                {
                    
users_team[id] = get_user_team(id)
                }
                
Solid[id] = pev(id,pev_solid) == SOLID_SLIDEBOX true false
                pev
(id,pev_origin,Origin[id] )
            }
            else
            {
                
Solid[id] = false
            
}
        }
    }
    
last_think plr
    
if(Solid[plr])
    {
        for(
id 1;id <= E_MaxPlayers;id++)
        {
            if(
Solid[id] && get_distance_f(Origin[plr],Origin[id]) <= DISTANCE && id != plr )
            {
                if( 
get_pcvar_num(CV_Semityp) && users_team[plr] != users_team[id] )
                {
                    return 
FMRES_IGNORED
                
}
                
set_pev(id,pev_solid,SOLID_NOT)
                
user_has_semi[id] = true
            
}
        }
    }
    return 
FMRES_IGNORED
}
public 
PostThink(plr)
{
    static 
id
    
for(id 1;id <= E_MaxPlayers;id++ )
    {
        if(
user_has_semi[id])
        {
            
set_pev(id,pev_solid,SOLID_SLIDEBOX)
            
user_has_semi[id] = false
        
}
    }
}
public 
Fullpack_Post(handle,e,ent,host,hostflags,player,pset)
{
    if(
player)
    {
        if(
Solid[host] && Solid[ent] && get_distance_f(Origin[host],Origin[ent]) <= DISTANCE)
        {
            if(
get_pcvar_num(CV_Semityp) && users_team[host] != users_team[ent])
            {
                return 
FMRES_IGNORED
            
}
            
set_es(handle,ES_Solid,SOLID_NOT)
            if(
get_pcvar_num(CV_Semitrynsparenty) == 1)
            {
                
set_es(handle,ES_RenderMode,kRenderTransAlpha)
                
set_es(handle,ES_RenderAmt,85)
            }
            else if(
get_pcvar_num(CV_Semitrynsparenty) == 2)
            {
                
set_es(handle,ES_Effects,EF_NODRAW)
                
set_es(handle,ES_Solid,SOLID_NOT)
            }
        }
    }
    return 
FMRES_IGNORED
}
public 
plugin_precache()
{
    
precache_sound("catchmod/ag_level_up.wav")
    
    if(
file_exists(SOUND_CATCHER_WIN) && get_pcvar_num(CV_CUSTOM_SOUND))
    {
        
precache_sound(SOUND_CATCHER_WIN)
        
precache_sound(SOUND_FLEER_WIN)
        
precache_sound(SOUND_CATCHER_LOSE)
        
precache_sound(SOUND_FLEER_LOSE)
    }
    else
    {
        
precache_sound(SOUND_CATCHER_WIN_DEFAULT)
        
precache_sound(SOUND_FLEER_WIN_DEFAULT)
        
precache_sound(SOUND_CATCHER_LOSE_DEFAULT)
        
precache_sound(SOUND_FLEER_LOSE_DEFAULT)
    }
}
public 
RestartRound()
{
    
server_cmd("sv_restart 1")
}
public 
fw_ThinkEntity(iEnt)
{
    
SpeedTask()
    
entity_set_float(iEntEV_FL_nextthinkget_gametime() + FREQ)
}  
public 
newRound()
{
    
round_ednded 0
    
for(new id=1;id<E_MaxPlayers;id++) 
    {
        
reset_stats(id)
    }
}
GetTopPlayers(players[32], &pnum, const flags[]="", const team[]="")
{
    
get_players(playerspnumflagsteam)
    
    
SortCustom1D(playerspnum"SortPlayers")
}
public 
SortPlayers(item1item2)
{
    new 
diff g_points[item2] - g_points[item1]
    
    if( !
diff )
    {
        
diff g_speed[item2] - g_speed[item1]
    }
    return 
clamp(diff, -11)
}
public 
game_comencing()
{
    for(new 
id 1;id <= E_MaxPlayers;id++)
    {
        
score[id][0] = 0
        score
[id][1] = 0
        score
[id][2] = 0
        score
[id][3] = 0
    
}
    if(
round_counter)
    {
        
round_counter 0
    
}
    else if(!
round_counter)
    {
        
round_counter 1
    
}
}
public 
endround()
{
    
round_ednded 1
    
    
if(round_counter)
    {
        
round_counter 0
        CSTS_ARE_CATCHER 
1
    
}
    else if(!
round_counter)
    {
        
round_counter 1
        CSTS_ARE_CATCHER 
0
    
}
    new 
punkte 0
    fleer_win 
0
    
for(new id=1;id<E_MaxPlayers;id++) 
    {
        if(
is_user_alive(id) && !user_is_catcher[id]) 
        {
            
score[id][3]++
            if(
cs_get_user_team(id) == CS_TEAM_T)
            {
                
points[0] += get_pcvar_num(CV_survivor)
            }
            else
            {
                
points[1] += get_pcvar_num(CV_survivor)
            }    
            
score[id][0] = score[id][0] + get_pcvar_num(CV_survivor)
            
apply_scoreboard_survived(id)
            
punkte++
            
fleer_win 1
        
}    
    }
    if(
fleer_win == 1
    {
        
ChatColor(0"%L"LANG_PLAYER,"FLEERS_WON"PLUGIN,punkte*get_pcvar_num(CV_survivor),punkte*get_pcvar_num(CV_survivor) > "s" "")
    }
    else
    {
        
ChatColor(0"%L"LANG_PLAYER,"CATCHERS_WON"PLUGIN)
    }
    new 
players[32], pnum
    GetTopPlayers
(playerspnum"h")
    new 
idname[33]
    new 
message[512], len
    
for( new 0pnumi++ )
    {
        
id players[i];
        
get_user_name(id,name,32)        
        
        
len += formatex(message[len], charsmax(message) - len"%s%d. %s : AG : %d Speed : %d"len "^n" "", (1), nameg_points[id], g_speed[id]);
    }
    
set_hudmessage(255,255,255,0.02,0.25,0,0.1,5.0,0.0,0.0)
    
show_hudmessage(0,"%s",message)

    
update_teamscore()
}
public 
update_teamscore() 
{
    
message_begin(MSG_ALL,get_user_msgid("TeamScore"))
    
write_string("TERRORIST")
    
write_short(points[0])
    
message_end()
    
    
message_begin(MSG_ALL,get_user_msgid("TeamScore"))
    
write_string("CT")
    
write_short(points[1])
    
message_end()
}
public 
reset_stats(id)
{
    
TURBO[id][0] = 0
    users_maxspeed_round
[id] = 0.0
    
if(!user_is_catcher[id])
    {
        if(
users_AG[id] == 0)
        {
            
TURBO[id][1] = 100
            AG_loop
[id] = 0
        
}
        else if(
users_AG[id] == 1)
        {
            
AG_loop[id] = 1
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 2)
        {
            
AG_loop[id] = 2
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 3)
        {
            
AG_loop[id] = 3
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 4)
        {
            
AG_loop[id] = 4
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 5)
        {
            
AG_loop[id] = 5
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 6)
        {
            
AG_loop[id] = 6
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        else if(
users_AG[id] == 8)
        {
            
AG_loop[id] = 8
            users_AG
[id] = 0
            AG_anzahl
[id][1] = 0
            AG_anzahl
[id][2] = 0
            AG_anzahl
[id][3] = 0
            AG_anzahl
[id][4] = 0
            AG_anzahl
[id][5] = 0
            AG_anzahl
[id][6] = 0
            AG_anzahl
[id][7] = 0
            corrent_AG
[id] = 0
        
}
        
TURBO[id][1] = 100
        set_task
(1.0,"Give_AGs",id,"",_,"a",AG_loop[id])
    }
    else
    {
        
TURBO[id][1] = 100 
    
}
}
public 
Give_AGs(id)
{
    
fix_task++
    
TURBO[id][1] = TURBO[id][1] + get_pcvar_num(CV_AG_TURBO)
    
emit_sound(idCHAN_ITEM"catchmod/ag_level_up.wav"1.0ATTN_NORM0PITCH_NORM)
    if(
fix_task == AG_loop[id])
    {
        
AG_loop[id] = 0
    
}
}
public 
touch(pToucherpTouched)
{
    if(!
round_ednded)
    {
        if(
IsPlayer(pToucher) && is_user_alive(pToucher) && user_is_catcher[pToucher])
        {
            if(
IsPlayer(pTouched) && is_user_alive(pTouched) && !user_is_catcher[pTouched])
            {    
                
score[pToucher][0] = score[pToucher][0] + get_pcvar_num(CV_Catch_Points)
                
score[pToucher][1]++
                
score[pTouched][2]++
                
                
                
set_msg_block(deathMsg,BLOCK_ONCE
                
set_msg_block(scoreMsg,BLOCK_ONCE)
                
user_silentkill(pTouched)
                
make_deathmsg(pToucher,pTouched,0,"his hands")
                
                
apply_scoreboard(pToucher)
                
apply_scoreboard(pTouched)                
                
update_teamscore()
            }
        }
    }
}
public 
Forward_TriggerMultipleTouch(iEntityid)
{
    static 
szModel[32]
    
entity_get_string(iEntityEV_SZ_modelszModel31)
    
    new 
target[32]
    
pev(iEntitypev_targetnametarget31)
    
    if(
is_user_alive(id) && !user_is_catcher[id] && equal(target"finish_round_fleer"))
    {
        new 
name[32]
        
get_user_name(id,name,32)
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
                
TerminateRound(RoundEndType_Objective,TeamWinning_Terrorist)
                
ChatColor(0"%L"LANG_PLAYER,"TERR_CATCHED_FLAG"PLUGIN,name)
            }
            case 
CS_TEAM_CT:
            {
                
TerminateRound(RoundEndType_Objective,TeamWinning_Ct)
                
ChatColor(0"%L"LANG_PLAYER,"CTS_CATCHED_FLAG"PLUGIN,name)
            }
        }
    }
}
public 
apply_scoreboard(id
{
    
message_begin(MSG_ALL,get_user_msgid("ScoreInfo"))
    
write_byte(id)
    
write_short(score[id][0])
    
write_short(score[id][2])
    
write_short(0)
    
write_short(get_user_team(id))
    
message_end()
}
public 
apply_scoreboard_survived(id
{
    
message_begin(MSG_ALL,get_user_msgid("ScoreInfo"))
    
write_byte(id)
    
write_short(score[id][0])
    
write_short(score[id][2])
    
write_short(0)
    
write_short(get_user_team(id))
    
message_end()
}
public 
Players_Spawn(id)
{
    if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
    {
        
g_iIsSpectator[id] = 0
        
if(get_pcvar_num(CV_AMXSUPER_FIX))
        {
            
set_task(3.0"godmode"id)
        }
        if(
CSTS_ARE_CATCHER == 1)
        {
            
Equip_Catcher(id)
        }
        else if(
CSTS_ARE_CATCHER == 0)
        {
            
Equip_Fleer(id)
        }
    }
    else if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
    {
        
g_iIsSpectator[id] = 0
        
if(get_pcvar_num(CV_AMXSUPER_FIX))
        {
            
set_task(3.0"godmode"id)
        }
        if(
CSTS_ARE_CATCHER == 0)
        {
            
Equip_Catcher(id)
        }
        else if(
CSTS_ARE_CATCHER == 1)
        {
            
Equip_Fleer(id)
        }
    }
    else if(
is_user_connected(id))
    {
        
set_user_rendering(id_000_0)
    }
}
public 
Equip_Catcher(id)
{
    if(
is_user_alive(id))
    {
        
user_is_catcher[id] = 1
        set_user_rendering
(id,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_U)
        
strip_user_weapons(id)
        
give_item(id,"weapon_knife")
        
set_user_godmode(id,1)
        
apply_scoreboard(id)
    }
}
public 
Equip_Fleer(id)
{
    if(
is_user_alive(id))
    {
        
user_is_catcher[id] = 0
        set_user_rendering
(id,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_U)
        
strip_user_weapons(id)
        
give_item(id,"weapon_knife")
        
set_user_godmode(id,1)
        
apply_scoreboard(id)
    }
}
public 
godmode(id)
{
    if(
is_user_alive(id))
    {
        
set_user_godmode(id,1)
    }
}
public 
client_putinserver(id
{
    
g_iIsSpectator[id] = 0
}
public 
client_disconnect(id)
{
    
g_iIsSpectator[id] = 0
}
public 
ev_SpecHealth2(id)
{
    
g_iIsSpectator[id] = read_data(2)
}  
public 
bunnyhop(id)
{
    if(!
is_user_alive(id) || !get_pcvar_num(CV_Bonnyhop))
    {
        return 
PLUGIN_HANDLED
    
}
    new 
buttons get_user_button(id)

    if(
buttons IN_JUMP
    {
        new 
flags entity_get_int(idEV_INT_flags)
            
        if(
flags|FL_WATERJUMP && entity_get_int(id,EV_INT_waterlevel)<&& flags&FL_ONGROUND
        {
            static 
Float:velocity[3]
            
entity_get_vector(idEV_VEC_velocityvelocity
            
velocity[2] += 250.0
            entity_set_vector
(idEV_VEC_velocityvelocity)
            
entity_set_int(idEV_INT_gaitsequence6)
        }
    }
    return 
PLUGIN_HANDLED
}
public 
secund_attack(ent)
{
    new 
id pev(ent,pev_owner)
    
    if(!
IsPlayer(id))
    {
        return 
HAM_IGNORED
    
}
    else if(!
chilldown[id])
    {
        if(
TURBO[id][0] == && TURBO[id][1] >= get_pcvar_num(CV_Turbo_Usage_Percent))
        {
            
User_has_turbo_ON(id)
        }
        else if(
TURBO[id][0] == 1)
        {
            
User_has_turbo_OFF(id)
        }
        return 
HAM_SUPERCEDE
    
}
    else
    {
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED
}
public 
primary_attack(ent)
{
    new 
id pev(ent,pev_owner)
    
    if(
IsPlayer(id))
    {
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED
}
public 
knife_weapon_change(iEnt)
{
    new 
id get_pdata_cbase(iEntm_pPlayerXO_WEAPON)

    
set_pev(idpev_viewmodel2"")
    
set_pev(idpev_weaponmodel2"")
}
public 
SpeedTask()
{
    static 
itarget
    
static Float:velocity[3]
    static 
Float:speed
    
for(i=1i<=E_MaxPlayersi++)
    {
        if(
is_user_alive(i))
        {
            
target pev(ipev_iuser1) == pev(ipev_iuser2) : i
            pev
(targetpev_velocityvelocity)
            
            
speed vector_length(velocity)
            
set_hudmessage(CV_Speedo_RCV_Speedo_GCV_Speedo_B0.410.7600.0FREQ0.010.0)
            if(
speed users_maxspeed_round[i])
            {
                
users_maxspeed_round[i] = speed            
            
}
            if(
speed users_maxspeed_map[i])
            {
                
users_maxspeed_map[i] = speed
            
}
            if(
speed best_speed)
            {
                
best_speed speed
                get_user_name
(i,top_speed_name,32)
            }
            if(
speed <= 1000)
            {
                
cs_set_user_armor(i,floatround(speed),CS_ARMOR_NONE)
                if(!
under_tausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(0
                    
write_string("item_longjump")
                    
write_byte(0)
                    
write_byte(255)
                    
write_byte(0)
                    
message_end()
                    
under_tausend[i] = 1
                    over_tausend
[i] = 0
                    over_twotausend
[i] = 0
                    dead_fixed_icon
[i] = 0
                    
if(!user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_U)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_U)
                    }
                }
                if(!
corrent_AG[i])
                {
                    
ShowSyncHudMsg(iSyncHud"No AGs received^nMaxspeed this round:  %f^nMaxspeed this MAP : %f^nBest Speed by %s : %f",users_maxspeed_round[i],users_maxspeed_map[i],top_speed_name,best_speed)
                }
                else
                {
                    
ShowSyncHudMsg(iSyncHud"Received AGs this round : +%dAG^nMaxspeed this round:  %f^nMaxspeed this MAP : %f^nBest Speed by %s : %f",corrent_AG[i],users_maxspeed_round[i],users_maxspeed_map[i],top_speed_name,best_speed)
                }
            }
            else if(
speed 1000 && speed 2000)
            {
                
cs_set_user_armor(i,floatround(speed) - 1000,CS_ARMOR_NONE)
                if(!
over_tausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(2)
                    
write_string("item_longjump")
                    
write_byte(0)
                    
write_byte(255
                    
write_byte(0)
                    
message_end()
                    
over_tausend[i] = 1
                    under_tausend
[i] = 0
                    over_twotausend
[i] = 0
                    dead_fixed_icon
[i] = 0
                    
if(user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_O)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_O)
                    }
                }
                if(
speed 1200 && !AG_anzahl[i][1])
                {
                    
AG_anzahl[i][1] = 1
                    corrent_AG
[i] = 1
                    
                
}
                else if(
speed 1200 && !AG_anzahl[i][2])
                {
                    
AG_anzahl[i][2] = 1
                    corrent_AG
[i] = 2
                
}
                else if(
speed 1400 && !AG_anzahl[i][3])
                {
                    
AG_anzahl[i][3] = 1
                    corrent_AG
[i] = 3
                
}
                else if(
speed 1600 && !AG_anzahl[i][4])
                {
                    
AG_anzahl[i][4] = 1
                    corrent_AG
[i] = 4
                
}
                else if(
speed 1800 && !AG_anzahl[i][5])
                {
                    
AG_anzahl[i][5] = 1
                    corrent_AG
[i] = 5
                
}
                
ShowSyncHudMsg(iSyncHud,"Speed : +%dAG +1000 - %f^nMaxspeed this round:  %f^nMaxspeed this MAP : %f^nBest Speed by %s : %f",corrent_AG[i],speed 1000,users_maxspeed_round[i],users_maxspeed_map[i],top_speed_name,best_speed)
            }
            else if(
speed 2000 && speed 3000)
            {
                
cs_set_user_armor(i,floatround(speed) - 2000,CS_ARMOR_NONE)
                if(!
over_twotausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(2)
                    
write_string("item_longjump")
                    
write_byte(255)
                    
write_byte(255)
                    
write_byte(0)
                    
message_end()
                    
over_tausend[i] = 0
                    under_tausend
[i] = 0
                    over_twotausend
[i] = 1
                    dead_fixed_icon
[i] = 0
                    
if(!user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_OO)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_OO)
                    }
                }
                if(
speed 2100 && !AG_anzahl[i][6])
                {
                    
AG_anzahl[i][6] = 1
                    corrent_AG
[i] = 6
                
}
                else if(
speed 2400 && !AG_anzahl[i][7])
                {
                    
AG_anzahl[i][7] = 1
                    corrent_AG
[i] = 8
                
}
                
ShowSyncHudMsg(iSyncHud,"Speed : +%dAG - 2000 %f^nMaxspeed this round:  %f^nMaxspeed this MAP : %f^nBest Speed by %s : %f",corrent_AG[i],speed 2000,users_maxspeed_round[i],users_maxspeed_map[i],top_speed_name,best_speed)
            }
        }
        else
        {
            if(
is_user_connected(i) && !dead_fixed_icon[i])
            {
                
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                
write_byte(2)
                
write_string("item_longjump")
                
write_byte(255)
                
write_byte(255)
                
write_byte(0)
                
message_end()
                
dead_fixed_icon[i] = 1
            
}
            
ShowSyncHudMsg(iSyncHud,"Speed : %f^nBest Speed by %s : %f",speed ,top_speed_name,best_speed)
        }
        
users_AG[i] = corrent_AG[i]
        
g_points[i] = users_AG[i]
        
g_speed[i] = floatround(users_maxspeed_round[i])
    }
}
public 
User_has_turbo_ON(id
{
    if(
is_user_alive(id) && !user_is_catcher[id]) 
    {
        if(
TURBO[id][1] < get_pcvar_num(CV_Turbo_Usage_Percent)) 
        {
            
TURBO[id][0] = 0
        
}
        else if(!
chilldown[id])
        {
            
TURBO[id][0] = 1
            TURBO
[id][1] -= get_pcvar_num(CV_Turbo_Usage_Percent)
            
set_task(get_pcvar_float(CV_Turbo_Usage_Time),"turbo_task",id)
            
Speed_settings(id)
            
chilldown[id] = 1
            UTIL_ScreenFade
(id,CV_Turbo_fade_STR,1.0,2.0,80)
        }
        
Player_Show_Stats(id)
    }
}
public 
User_has_turbo_OFF(id
{
    if(
TURBO[id][0] == 1
    {
        
TURBO[id][0] = 0
        remove_task
(id+10000)
        
Player_Show_Stats(id)
    }
}
public 
Speed_settings(id)  
{
    new 
Float:speed
    
    
if(!user_is_catcher[id])
    {
        
speed 320.0 get_pcvar_float(CV_Catch_speed) * get_pcvar_float(CV_Catch_fleer_speed)
        if(
TURBO[id][0] == 1)
        {
            
speed *= get_pcvar_float(CV_Catch_Turbo_speed)
            
set_task(get_pcvar_float(CV_Turbo_Usage_Time),"turbo_fix",id)
        }
    }
    else 
    {
        
speed 320.0 get_pcvar_float(CV_Catch_speed) * get_pcvar_float(CV_catchers_speed)
    }
    if(
is_user_alive(id))
    {
        
set_user_maxspeed(id,speed)
    }
}
public 
Player_AddPlayerItem(id iWeapon)
{
    if(
ExecuteHam(Ham_Item_GetWeaponPtriWeapon) != iWeapon    ||cs_get_weapon_id(iWeapon) != CSW_C4)
    {
        return 
HAM_IGNORED
    
}
    
set_pev(iWeaponpev_flagspev(iWeaponpev_flags) | FL_KILLME)
    
cs_set_user_plant(id0)
    
set_pev(idpev_body0)
    
SetHamReturnInteger(0)
    return 
HAM_SUPERCEDE
}
public 
message_textmsg( const MsgId, const MsgDest, const MsgEntity )
{    
    static 
message[32]
    
get_msg_arg_string(2messagecharsmax(message))
    if(
equal(message"#Terrorists_Win"))
    {
        if(!
CSTS_ARE_CATCHER)
        {
            
formatex(winmsg31"#Catchers win")
        }
        else if(
CSTS_ARE_CATCHER)
        {
            
formatex(winmsg31"#Fleers win")
        }
    }
    else if(
equal(message"#CTs_Win"))
    {
        if(
CSTS_ARE_CATCHER)
        {
            
formatex(winmsg31"#Catchers win")
        }
        else if (!
CSTS_ARE_CATCHER)
        {
            
formatex(winmsg31"#Fleers win")
        }
    }
    else if(
equal(message,"#Target_Saved"))
    {
            
formatex(winmsg31"#Fleer win")
    }
    
set_msg_arg_string(2winmsg)
}
public 
play_win_sound()
{
    
client_cmd(0"stopsound")
    
    for (new 
id 1id <= E_MaxPlayersid++)
    {
        if(
is_user_connected(id))
        {
            if(
CSTS_ARE_CATCHER//CTs sind catcher
            
{
                if(
cs_get_user_team(id) == CS_TEAM_T && user_is_catcher[id])
                {
                    if(
get_pcvar_num(CV_CUSTOM_SOUND))
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_CATCHER_WIN)
                    }
                    else
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_CATCHER_WIN_DEFAULT)
                    }
                }
                else if(
cs_get_user_team(id) == CS_TEAM_CT && !user_is_catcher[id])
                {
                    if(
get_pcvar_num(CV_CUSTOM_SOUND))
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_FLEER_LOSE)
                    }
                    else
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_FLEER_LOSE_DEFAULT)
                    }
                }
            }
            else 
//Ts sind catcher
            
{
                
                if(
cs_get_user_team(id) == CS_TEAM_T && !user_is_catcher[id])
                {
                    if(
get_pcvar_num(CV_CUSTOM_SOUND))
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_FLEER_LOSE)
                    }
                    else
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_FLEER_LOSE_DEFAULT)
                    }
                }
                else if(
cs_get_user_team(id) == CS_TEAM_CT && user_is_catcher[id])
                {
                    if(
get_pcvar_num(CV_CUSTOM_SOUND))
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_CATCHER_WIN)
                    }
                    else
                    {
                        
client_cmd(id"spk ^"%s^""SOUND_CATCHER_WIN_DEFAULT)
                    }
                }
            }
        }
    }
}
public 
turbo_fix(id)
{
    
TURBO[id][0] = 0
}
public 
apply(id)
{
    
apply_scoreboard(id)
}
public 
Show_Stats() 
{
    for(new 
id=1;id <= E_MaxPlayers;id++) 
    {
        if(
is_user_alive(id)) 
        {
            
Player_Show_Stats(id)
        }
    }
}
public 
Player_Show_Stats(id
{
    new 
turbos[128]
    
set_dhudmessage(025500.400.7022.010.00.11.5)
    if(!
user_is_catcher[id]) 
    {
        if(
TURBO[id][1] >= get_pcvar_num(CV_Turbo_Usage_Percent))
        {
            if(
TURBO[id][0] == 1)
            {
                
turbo_used[id]++
                
set_dhudmessage(255000.400.7022.010.00.11.5)
                
format(turbos,127,"You are a FLEER^nTurbo: [|||||||||||||||] - %d%",TURBO[id][1])
            }
            else if(
TURBO[id][1])
            {
                
format(turbos,127,"You are a FLEER^nTurbo: [|||||||||||||||] - %d%",TURBO[id][1])    
            }
        }
        else if(
TURBO[id][1] <= get_pcvar_num(CV_Turbo_Usage_Percent))
        {
            
format(turbos,127,"You are a FLEER^nTurbo: [|||||||||||||||] - OFF")
        }
    }
    else if(
user_is_catcher[id]) 
    {
        
format(turbos,127,"You are a CATCHER^nTurbo: [|||||||||||||||] - OFF")
    }
    
show_dhudmessage(id"%s",turbos)
}
public 
turbo_task(id
{
    if(
is_user_alive(id)) 
    {
        if(!
user_is_catcher[id]) 
        {
            if(
TURBO[id][1] > get_pcvar_num(CV_Turbo_Usage_Percent)) 
            {
                
TURBO[id][0] = 0
                Speed_settings
(id
                
Player_Show_Stats(id)
            }
            else 
            {
                
TURBO[id][1] -= get_pcvar_num(CV_Turbo_Usage_Percent)
                
Speed_settings(id
                
Player_Show_Stats(id)
            }
        }
        else 
        {
            
TURBO[id][0] = 0
            Player_Show_Stats
(id)            
        }
    }
    else 
    {
        
TURBO[id][0] = 0        
    
}
    
set_task(get_pcvar_float(CV_CHILLDOWN_TIME),"task_chilldown",id)
}
public 
task_chilldown(id)
{
    
chilldown[id] = 0



SnoW 04-28-2011 12:04

Re: code or compiler bug/problem?
 
Following crashes the compiler as well.
Code:
#define a a a

You can decide whether it's the compiler's or the code's fault.

One 04-28-2011 12:10

Re: code or compiler bug/problem?
 
huh?
i cant find any fault defines in my code o,O
so its a fault of compiler but why? it was working well

One 04-28-2011 14:26

Re: code or compiler bug/problem?
 
ok i found the problem.
when i use now_speed its ok but when i change it to now_maxspeed my compiler willbe crashed. why?

works :arrow:
Code:

#define QUERY_CREATE_TABLE "CREATE TABLE IF NOT EXISTS `catchmod` ( \
        `authid` VARCHAR( 32 ) NOT NULL, \
        `rank` INT( 6 ) NOT NULL, \
        `name` VARCHAR( 32 ) NOT NULL, \
        `AGs` INT( 6 ) NOT NULL, \
        `maxspeed` INT( 12 ) NOT NULL, \
    `map` VARCHAR( 32 ) NOT NULL, \
    `catched` INT( 6 ) NOT NULL, \
    `catchs` INT( 6 ) NOT NULL, \
    `fps` INT( 6 ) NOT NULL, \
    `survives` INT( 6 ) NOT NULL, \
    `flagged` INT( 6 ) NOT NULL, \
    `now_map` VARCHAR( 32 ) NOT NULL, \
    `now_speed` INT( 6 ) NOT NULL, \
    PRIMARY KEY ( `authid` ) );"

crashs the compiler :arrow:
Code:

#define QUERY_CREATE_TABLE "CREATE TABLE IF NOT EXISTS `catchmod` ( \
        `authid` VARCHAR( 32 ) NOT NULL, \
        `rank` INT( 6 ) NOT NULL, \
        `name` VARCHAR( 32 ) NOT NULL, \
        `AGs` INT( 6 ) NOT NULL, \
        `maxspeed` INT( 12 ) NOT NULL, \
    `map` VARCHAR( 32 ) NOT NULL, \
    `catched` INT( 6 ) NOT NULL, \
    `catchs` INT( 6 ) NOT NULL, \
    `fps` INT( 6 ) NOT NULL, \
    `survives` INT( 6 ) NOT NULL, \
    `flagged` INT( 6 ) NOT NULL, \
    `now_map` VARCHAR( 32 ) NOT NULL, \
    `now_maxspeed` INT( 6 ) NOT NULL, \
    PRIMARY KEY ( `authid` ) );"

PS. i tried to add live_speed or more things and this all works. for sure i can use other things for my table but i want to know why this crashs the compiler.

Exolent[jNr] 04-28-2011 17:19

Re: code or compiler bug/problem?
 
Your string is probably too long and needs to be formatted a piece at a time.

One 04-28-2011 17:25

Re: code or compiler bug/problem?
 
oh
i never tought there is a limit for this.
ty Exo


All times are GMT -4. The time now is 04:31.

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