Raised This Month: $32 Target: $400
 8% 

error 035: argument type mismatch (argument 1)


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

Hey, so I want to make class plugin, and I want to remember which class member had when they leave the server. I wanted to use nVault, but for some reason it gives me this error.

Here is my code
PHP Code:
public rank_ten_c_one(id//Samurai
{
    
get_user_authidid g_szAuthID[id] , charsmaxg_szAuthID[] ) );

    new 
szClass;
    new 
szKey[40];

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

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

I use g_Vault to set integer for each class, Example: Assasin = 1, Wizard = 2 ....
And on client_authorized, I would read szClass value from nVault like this:

PHP Code:
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);
            }
        }
    }

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

PHP Code:
formatexszClass charsmaxszClass ) , %g_Class ); 


PHP Code:
formatexszClass charsmaxszClass ) , "%d"g_Class ); 
__________________


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 11:30.
iceeedr is offline
Send a message via Skype™ to iceeedr
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 11:36   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #3

Doesn't work
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
mahbodsr
Member
Join Date: Jun 2016
Old 06-13-2020 , 11:38   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #4

you have type error
you are formating a non-string variable
szClass should be string


PHP Code:
new szClass


PHP Code:
new szClass[X]; // put something instead of X 

Last edited by mahbodsr; 06-13-2020 at 11:51.
mahbodsr is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 11:47   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #5

Yeah, I'm stupid, I will tell you if it works...
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 11:49   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #6

Nope, doesn't work.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-13-2020 , 11:50   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #7

Please post the actual error/issue, not only "doesn't work".
__________________
HamletEagle is offline
mahbodsr
Member
Join Date: Jun 2016
Old 06-13-2020 , 11:57   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #8

your topic title is about argument type mismatch
and solution is above

so if you got any other errors post it not simply saying ok or doesnt work

Last edited by mahbodsr; 06-13-2020 at 11:58.
mahbodsr is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-13-2020 , 12:10   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #9

No solution is not above, I already said that I am getting that same message again. That means that your "solution" doesn't work.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
mahbodsr
Member
Join Date: Jun 2016
Old 06-13-2020 , 12:14   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #10

guy u were formating/setting nvault by a non-string variable
so that was wrong and i told you the solution
now maybe you are getting error from other side or smthng
which line you got error from?

post your error and code completly

Last edited by mahbodsr; 06-13-2020 at 12:24.
mahbodsr 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 17:35.


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