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

error 035: argument type mismatch (argument 1)


Post New Thread Reply   
 
Thread Tools Display Modes
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 12:24   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #11

I tried what you said, and I couldn't do it with integer, so I replaced numbers with "Assasin", "Wizard"... But weird thing is that I already tried this on a different plugin, and it worked, I have no idea why did I get this message in the first place.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-13-2020 , 16:41   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #12

Post the full code if you're not going to explain properly.
__________________

Last edited by OciXCrom; 06-13-2020 at 16:41.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 19:14   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #13

Quote:
Originally Posted by OciXCrom View Post
Post the full code if you're not going to explain properly.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <crxranks>
#include <nvault>
#include <hamsandwich>

new g_Vault
new g_szAuthID[33][35]; 
new 
g_Class

// LEVEL 10
#define C_ONE_TEN "\wSamurai" //Change name for first class
#define C_TWO_TEN "\wSoldier" //Change name for second class
#define C_THREE_TEN "\wMage" //Change name for third class

// LEVEL 20
#define C_ONE_TW "\wNinja" //Change name for first class
#define C_TWO_TW "\wWizard" //Change name for second class
#define C_THREE_TW "\wTank" //Change name for third class

public plugin_init()
{
    
register_plugin("Class Menu for CRX""1.1""Mr. Boopsy");
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1);
}

public 
plugin_cfg()
{
    new 
g_Vault nvault_open"ClassID" );

    if ( 
g_Vault == INVALID_HANDLE )
        
set_fail_state"Error opening nVault" );
}

public 
plugin_end()
{
    
nvault_closeg_Vault );
}

public 
client_authorized(id)
{
    new 
szKey[40];
    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    new 
iClass nvault_getg_Vault szKey );
    if( 
iClass )
    {
        switch(
iClass)
        {
            case 
1:
            {
                
set_user_health(id110);
                
set_user_gravity(id1.2);
            }
            case 
2:
            {
                
set_user_health(id120);
                
set_user_gravity(id1.3);
            }
            case 
3:
            {
                
set_user_health(id130);
                
set_user_gravity(id1.2);
            }
            case 
4:
            {
                
set_user_health(id130);
                
set_user_gravity(id1.2);
                
set_user_maxspeed(id1.5);
            }
            case 
5:
            {
                
set_user_health(id110);
                
set_user_gravity(id1.6);
                
set_user_maxspeed(id1.1);
            }
            case 
6:
            {
                
set_user_health(id190);
                
set_user_gravity(id0.8);
                
set_user_maxspeed(id0.8);
            }
        }
    }
}

public 
crxranks_user_level_updated(idlevelbool:levelup)
{
    new 
cLevel crxranks_get_user_level(id);
    if( 
cLevel == 10 )
    {
        
rank_ten(id);
        
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );
    }
    else if( 
cLevel == 20 )
    {
        
rank_tw(id);
        
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );
    }
}

public 
rank_ten(id)
{
    new 
menu_ten menu_create("\r[\wChoose Class\r]\r""menu_ten_f")
    
    
menu_additem(menu_tenC_ONE_TEN"1"0)
    
menu_additem(menu_tenC_ONE_TEN"2"0)
    
menu_additem(menu_tenC_THREE_TEN"3"0)
    
    
menu_setprop(menu_tenMPROP_EXITMEXIT_ALL)
    
    
menu_display(idmenu_ten0)
}

public 
rank_tw(id)
{
    new 
menu_tw menu_create("\r[\wChoose Class\r]\r""menu_tw_f")
    
    
menu_additem(menu_twC_ONE_TW"1"0)
    
menu_additem(menu_twC_ONE_TW"2"0)
    
    
menu_setprop(menu_twMPROP_EXITMEXIT_ALL)
    
    
menu_display(idmenu_tw0)
}

public 
menu_ten_f(idmenu_tenitem_ten)
{
    if (
item_ten == MENU_EXIT)
    {
        
menu_destroy(menu_ten)
        return 
PLUGIN_HANDLED
    
}
    new 
data_ten[6], iName_ten[64]
    new 
acces_tencallback_ten
    menu_item_getinfo
(menu_tenitem_tenacces_tendata_ten,5iName_ten63callback_ten)
    
    new 
key_ten str_to_num(data_ten)
    
    switch(
key_ten)
    { 
       case 
1:
       {
           
rank_ten_c_one(id);
           
g_Class 1;
       }
       case 
2:
       {
           
rank_ten_c_two(id);
           
g_Class 2;
       }
       case 
3:
       {
           
rank_ten_c_three(id);
           
g_Class 3;
       }
    }
    
menu_destroy(menu_ten)
    return 
PLUGIN_HANDLED
}

public 
menu_tw_f(idmenu_twitem_tw)
{
    if (
item_tw == MENU_EXIT)
    {
        
menu_destroy(menu_tw)
        return 
PLUGIN_HANDLED
    
}
    new 
data_tw[6], iName_tw[64]
    new 
acces_twcallback_tw
    menu_item_getinfo
(menu_twitem_twacces_twdata_tw,5iName_tw63callback_tw)
    
    new 
key_tw str_to_num(data_tw)
    
    switch(
key_tw)
    { 
       case 
1:
       {
           
rank_tw_c_one(id);
           
g_Class 4;
       }
       case 
2:
       {
           
rank_tw_c_two(id);
           
g_Class 5;
       }
       case 
3:
       {
           
rank_tw_c_three(id);
           
g_Class 6;
       }
    }
    
menu_destroy(menu_tw)
    return 
PLUGIN_HANDLED
}

public 
rank_ten_c_one(id//Samurai
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new Class[
5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatex( Class , charsmax( Class ) , "%d" g_Class );
    
    
nvault_setg_Vault szKey , Class );

    
set_user_health(id110);
    
set_user_gravity(id1.2);
}

public 
rank_ten_c_two(id//Soldier
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass[5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatexszClass charsmaxszClass ) , "%d"g_Class ); //Soldier
    
    
nvault_setg_Vault szKey szClass );
    
    
set_user_health(id120);
    
set_user_gravity(id1.3);
}

public 
rank_ten_c_three(id//Mage
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass[5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatexszClass charsmaxszClass ) , "%d"g_Class ); //Mage
    
    
nvault_setg_Vault szKey szClass );

    
set_user_health(id130);
    
set_user_gravity(id1.2);
}

// LEVEL 20
public rank_tw_c_one(id//Ninja
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass[5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatexszClass charsmaxszClass ) , "%d"g_Class ); //Ninja
    
    
nvault_setg_Vault szKey szClass );

    
set_user_health(id130);
    
set_user_gravity(id1.2);
    
set_user_maxspeed(id1.5);
}

public 
rank_tw_c_two(id//Wizard
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass[5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatexszClass charsmaxszClass ) , "%d"g_Class ); //Wizard
    
    
nvault_setg_Vault szKey szClass );

    
set_user_health(id110);
    
set_user_gravity(id1.6);
    
set_user_maxspeed(id1.1);
}

public 
rank_tw_c_three(id//Tank
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass[5];
    new 
szKey[40];

    
formatexszKey charsmaxszKey ) , "%sCLASS" g_szAuthID[id] );
    
formatexszClass charsmaxszClass ) , "%d"g_Class ); //Tank
    
    
nvault_setg_Vault szKey szClass );

    
set_user_health(id190);
    
set_user_gravity(id0.8);
    
set_user_maxspeed(id0.8);

__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-13-2020 , 19:59   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #14

No errors.

Code:
Compiling tst... Current time is: 20:58:25,36 - 13/06/2020

AMX Mod X Compiler 1.10.0.5377
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Header size:           1216 bytes
Code size:             7116 bytes
Data size:             6212 bytes
Stack/heap size:      16384 bytes
Total requirements:   30928 bytes
Done.

1 File(s) copied, to the folder D:\steamcmd\hlds\cstrike\addons\amxmodx\plugins\tst.amxx
1 arquivo(s) copiado(s), to the folder C:\Users\Bruno\Desktop

Took 0:00:00,26 seconds to run this script.

[Finished in 0.3s]
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 06-13-2020 at 19:59.
iceeedr is offline
Send a message via Skype™ to iceeedr
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 20:39   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #15

Hm, I reverted my plugin to older version, but when I tried using fwPlayerSpawn, it didn't work.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-13-2020 , 20:50   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #16

You do not have the function defined so you're getting an error when the plugin starts.

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);

You need the below, with code in it.
PHP Code:
public fw_PlayerSpawn_PostiPlayer )
{
    if ( 
is_user_aliveiPlayer ) )
    {

    }

__________________

Last edited by Bugsy; 06-13-2020 at 20:51.
Bugsy 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 22:56.


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