AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ Help ] Error: Number of arguments does not match definition (https://forums.alliedmods.net/showthread.php?t=308464)

Fuck For Fun 06-21-2018 07:00

[ Help ] Error: Number of arguments does not match definition
 
okay I never got that kind of mistake.
Code:

native get_user_bank( client );
native set_user_bank( client );

Code:

static Amount;
        set_user_bank( client, get_user_bank( client ) + Amount );
       
        set_user_cash( client, get_user_cash( client ) - Amount );

How arguments does not match?

maqi 06-21-2018 07:27

Re: [ Help ] Error: Number of arguments does not match definition
 
Declaration of a native has 1 argument, you are trying to pass 2 :D Simple as that

Declare the native as get/set_user_bank( client, amount );

Fuck For Fun 06-21-2018 07:31

Re: [ Help ] Error: Number of arguments does not match definition
 
Quote:

Originally Posted by maqi (Post 2598395)
Declaration of a native has 1 argument, you are trying to pass 2 :D Simple as that

Declare the native as get/set_user_bank( client, amount );

oh you right :)
thanks bro
Code:

native set_user_cash( client, Amount );

maqi 06-21-2018 07:40

Re: [ Help ] Error: Number of arguments does not match definition
 
Anytime, don't forget to do the same in the native definition


All times are GMT -4. The time now is 10:21.

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