Raised This Month: $51 Target: $400
 12% 

Solved ZP4.3 XP to 5.0.8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-22-2014 , 14:05   ZP4.3 XP to 5.0.8
Reply With Quote #1

Hi AM users and staff, i have tryied to reconvert Zombie XP V0.8 by redomina8 for ZP 5.0 version, and i have succeded with forwards / natives and everything it works flawessly from my tests , but still it gives me a warning when i'm compiling it don't know why , here is the code
PHP Code:
public native_register_zombie_class ( const name [ ], const info [ ], const model [ ], const clawmodel [ ], hpspeedFloat:gravityFloat:knockbacklevel )
{    
    
// Dont return -1, we wil get lots of server window print errors from the plugins
    
if ( get_pcvar_num cvar_removezombie ) == 2)
        return 
0;
    
    
// Bugfix for loading zombies
    
loadedZombies true;
    
    
// Strings passed byref
    
param_convert );
    
param_convert );
    
param_convert );
    
param_convert );
    
    
// Save the name, level required, and classid
    
copy g_zclass_name     g_zclass_i ], sizeof g_zclass_name [ ] -1name );
    
copy g_zclass_info     g_zclass_i ], sizeof g_zclass_info [ ] - 1info );
    
copy g_zclass_model     g_zclass_i ], sizeof g_zclass_model [ ] - 1model );
    
copy g_zclass_clawmodel g_zclass_i ], sizeof g_zclass_clawmodel [ ] - 1clawmodel );
    
    
g_zclass_hp    g_zclass_i ] = hp
    g_zclass_spd    
g_zclass_i ] = speed
    g_zclass_grav    
g_zclass_i ] = gravity
    g_zclass_kb    
g_zclass_i ] = knockback
    g_zclass_lvl    
g_zclass_i ] = level
    
    
// For the load_data and save_data
    
new tSave 40 ];
    
formatex tSavesizeof tSave 1"%s%s"nameinfo );
    
replace_all tSavesizeof tSave 1";""" );
    
replace_all tSavesizeof tSave 1" """ );
    
g_zclass_load g_zclass_i ] =  tSave;
    
    
// Get the classid from zombie plague
    
new g_returnclass_id;
    
    
g_returnclass_id zp_class_zombie_register g_zclass_name g_zclass_i ], g_zclass_info g_zclass_i ], g_zclass_hp g_zclass_i ] / 2g_zclass_spd g_zclass_i ], g_zclass_grav g_zclass_i ] );
    
    
zp_class_zombie_register_model g_returnclass_idg_zclass_model g_zclass_i ] );
    
zp_class_zombie_register_claw g_returnclass_idg_zclass_clawmodel g_zclass_i ] );
    
zp_class_zombie_register_kb g_returnclass_idg_zclass_kb g_zclass_i ] );
    
    if ( 
g_returnclass_id == -)
    {
        
server_print "%s %L"textHeaderLANG_PLAYER"ERR_BADRETURN" );
        return -
1;
    }
    
    
g_zclass_i++
    
    return 
g_zclass_i-1;

And the warning:
Code:
Welcome to the AMX Mod X 1.8.3-dev+63322c9 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Warning: Tag mismatch on line 1570
Header size:           3512 bytes
Code size:            38856 bytes
Data size:            74212 bytes
Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
Total requirements:  132964 bytes

1 Warning.
Copied output file to: D:\HLDS\steamcmd\hlds\czero\addons\amxmodx\plugins\
Done.
The error is here
PHP Code:
g_returnclass_id zp_class_zombie_register g_zclass_name g_zclass_i ], g_zclass_info g_zclass_i ], g_zclass_hp g_zclass_i ] / 2g_zclass_spd g_zclass_i ], g_zclass_grav g_zclass_i ] ); 
And i cannot think why ... :-?? i can ignore it but i don't want to
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 03-23-2017 at 17:14.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 07-23-2014 , 03:11   Re: ZP4.3 XP to 5.0.8
Reply With Quote #2

Change this:

PHP Code:
public native_register_zombie_class ( const name [ ], const info [ ], const model [ ], const clawmodel [ ], hpspeedFloat:gravityFloat:knockbacklevel )

to this:

PHP Code:
public native_register_zombie_class ( const name [ ], const info [ ], const model [ ], const clawmodel [ ], hpFloat:speedFloat:gravityFloat:knockbacklevel )

wicho is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-23-2014 , 06:21   Re: ZP4.3 XP to 5.0.8
Reply With Quote #3

Sorry forgot to menion i have already solved and that was not the thing that solved, with that throws may more errors solving was:
PHP Code:
g_returnclass_id zp_class_zombie_register g_zclass_name g_zclass_i ], g_zclass_info g_zclass_i ], g_zclass_hp g_zclass_i ] / 2g_zclass_spd g_zclass_i ], g_zclass_grav g_zclass_i ] ); 
to
PHP Code:
g_returnclass_id zp_class_zombie_register g_zclass_name g_zclass_i ], g_zclass_info g_zclass_i ], g_zclass_hp g_zclass_i ] / 2Float:g_zclass_spd g_zclass_i ], g_zclass_grav g_zclass_i ] ); 
Error was
Code:
g_zclass_spd [ g_zclass_i ]
to
PHP Code:
Float:g_zclass_spd g_zclass_i 
When i will finish the plugin and test him i will post it for everyone!

Thanks!
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 07-23-2014 at 06:23.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
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 11:01.


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