Raised This Month: $ Target: $400
 0% 

Pawn preprocessor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-03-2014 , 10:11   Pawn preprocessor
Reply With Quote #1

PHP Code:
stock cs_reset_user_maxspeed(id)
{
    static 
Float:maxspeed;
    switch(
get_user_weapon(id))
    {
        case 
CSW_SG550CSW_AWPCSW_G3SG1maxspeed 210.0;
        case 
CSW_M249maxspeed 220.0;
        case 
CSW_AK47maxspeed 221.0;
        case 
CSW_M3CSW_M4A1maxspeed 230.0;
        case 
CSW_SG552maxspeed 235.0;
        case 
CSW_XM1014CSW_AUGCSW_GALILCSW_FAMASmaxspeed 240.0;
        case 
CSW_P90maxspeed 245.0;
        case 
CSW_SCOUTmaxspeed 260.0;
        default: 
maxspeed 250.0;
    }
    
#if defined _fun_included
    
set_user_maxspeed(idmaxspeed);
    
#elseif defined _engine_included
    
entity_set_float(idEV_FL_maxspeedmaxspeed);
    
#else
    
set_pev(idpev_maxspeedmaxspeed);
    
#endif

This code gives me error: undefined symbol "set_user_maxspeed", but includes look like this:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <jailbreak> // my include which includes that stock 
What is the problem?
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 07-03-2014 , 10:19   Re: Pawn preprocessor
Reply With Quote #2

Quote:
Originally Posted by GuskiS View Post
PHP Code:
stock cs_reset_user_maxspeed(id)
{
    static 
Float:maxspeed;
    switch(
get_user_weapon(id))
    {
        case 
CSW_SG550CSW_AWPCSW_G3SG1maxspeed 210.0;
        case 
CSW_M249maxspeed 220.0;
        case 
CSW_AK47maxspeed 221.0;
        case 
CSW_M3CSW_M4A1maxspeed 230.0;
        case 
CSW_SG552maxspeed 235.0;
        case 
CSW_XM1014CSW_AUGCSW_GALILCSW_FAMASmaxspeed 240.0;
        case 
CSW_P90maxspeed 245.0;
        case 
CSW_SCOUTmaxspeed 260.0;
        default: 
maxspeed 250.0;
    }
    
#if defined _fun_included
    
set_user_maxspeed(idmaxspeed);
    
#elseif defined _engine_included
    
entity_set_float(idEV_FL_maxspeedmaxspeed);
    
#else
    
set_pev(idpev_maxspeedmaxspeed);
    
#endif

This code gives me error: undefined symbol "set_user_maxspeed", but includes look like this:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <jailbreak> // my include which includes that stock 
What is the problem?
---------------------------
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Header size: 404 bytes
Code size: 444 bytes
Data size: 40 bytes
Stack/heap size: 16384 bytes; estimated max. usage=42 cells (168 bytes)
Total requirements: 17272 bytes
Done.
--------------------------

i put the same code ... and it dont show any error
Porta0123 is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-03-2014 , 10:28   Re: Pawn preprocessor
Reply With Quote #3

Weird, I'm still having this error. Try to include fun, compile then. After that recompile without fun, I'm wondering if it somehow stays in memory :O
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 07-03-2014 , 11:04   Re: Pawn preprocessor
Reply With Quote #4

without fun:


with fun:

Porta0123 is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-03-2014 , 11:15   Re: Pawn preprocessor
Reply With Quote #5

The thing about "stock" is that it means you can compile without that function if you don't use it. Set it to public and you should get that error.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness

Last edited by GuskiS; 07-03-2014 at 11:16.
GuskiS is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 07-03-2014 , 11:19   Re: Pawn preprocessor
Reply With Quote #6

Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #include <cstrike> public cs_reset_user_maxspeed(id) {     static Float:maxspeed;     switch(get_user_weapon(id))     {         case CSW_SG550, CSW_AWP, CSW_G3SG1: maxspeed = 210.0;         case CSW_M249: maxspeed = 220.0;         case CSW_AK47: maxspeed = 221.0;         case CSW_M3, CSW_M4A1: maxspeed = 230.0;         case CSW_SG552: maxspeed = 235.0;         case CSW_XM1014, CSW_AUG, CSW_GALIL, CSW_FAMAS: maxspeed = 240.0;         case CSW_P90: maxspeed = 245.0;         case CSW_SCOUT: maxspeed = 260.0;         default: maxspeed = 250.0;     }     #if defined _fun_included     set_user_maxspeed(id, maxspeed);     #elseif defined _engine_included     entity_set_float(id, EV_FL_maxspeed, maxspeed);     #else     set_pev(id, pev_maxspeed, maxspeed);     #endif }

Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #include <cstrike> stock cs_reset_user_maxspeed(id) {     static Float:maxspeed;     switch(get_user_weapon(id))     {         case CSW_SG550, CSW_AWP, CSW_G3SG1: maxspeed = 210.0;         case CSW_M249: maxspeed = 220.0;         case CSW_AK47: maxspeed = 221.0;         case CSW_M3, CSW_M4A1: maxspeed = 230.0;         case CSW_SG552: maxspeed = 235.0;         case CSW_XM1014, CSW_AUG, CSW_GALIL, CSW_FAMAS: maxspeed = 240.0;         case CSW_P90: maxspeed = 245.0;         case CSW_SCOUT: maxspeed = 260.0;         default: maxspeed = 250.0;     }     #if defined _fun_included     set_user_maxspeed(id, maxspeed);     #elseif defined _engine_included     entity_set_float(id, EV_FL_maxspeed, maxspeed);     #else     set_pev(id, pev_maxspeed, maxspeed);     #endif }   public client_putinserver(id) {     cs_reset_user_maxspeed(id) }

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Header size: 484 bytes
Code size: 984 bytes
Data size: 44 bytes
Stack/heap size: 16384 bytes; estimated max. usage=42 cells (168 bytes)
Total requirements: 17896 bytes
Done.

Last edited by Porta0123; 07-03-2014 at 11:20.
Porta0123 is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-03-2014 , 12:39   Re: Pawn preprocessor
Reply With Quote #7

Sorry, indeed it works. I forgot that I had used set_user_maxspeed somewhere in that plugin. I was working on that stock and I was doing something wrong, after fixing it, I didn't read the whole message - that error was in plugin, not stock. Thanks anyways
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS 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:16.


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