SA-MP Forums Archive
error 035: argument type mismatch (argument 1) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 035: argument type mismatch (argument 1) (/showthread.php?tid=335696)



error 035: argument type mismatch (argument 1) - Deduction - 19.04.2012

So I keep getting an error "error 035: argument type mismatch (argument 1)"

The error is on this line.

pawn Код:
if(strcmp(weaponid, string) == 0)  // < < < THIS LINE
        {
            fclose(file);
            return 1;
        }
Basicly what it is I send a WeaponID like CheckWeaponID(weaponid) in a command.
Then this checks the weaponID with a file, but im having trouble trying to get this to work.

Any ideas?

+Rep for someone who helps.


Re: error 035: argument type mismatch (argument 1) - SuperViper - 19.04.2012

pawn Код:
if(strcmp(weaponid, strval(string)) == 0)  // < < < THIS LINE
        {
            fclose(file);
            return 1;
        }



Re: error 035: argument type mismatch (argument 1) - Calgon - 19.04.2012

strcmp is for comparing strings, not integers.

pawn Код:
if(weaponid == strval(string)) {
    fclose(file);
    return 1;
}
This should work. strval converts the string into an integer, so you can use the standard equal sign operator to compare the two values.


Re: error 035: argument type mismatch (argument 1) - Deduction - 19.04.2012

Wow thanks, Calgon, can't believe theres people in the SA:MP Community like you who help others out!

+REP to Calgon


Re: error 035: argument type mismatch (argument 1) - MP2 - 19.04.2012

Quote:
Originally Posted by Deduction
Посмотреть сообщение
Wow thanks, Calgon, can't believe theres people in the SA:MP Community like you who help others out!

+REP to Calgon
It's not that uncommon..


Re: error 035: argument type mismatch (argument 1) - TedakCZe - 14.12.2015

hi please help me:
Quote:

C:\Users\JA\Desktop\saserver\gamemodes\HellSarkCZ. pwn(455) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.




Re: error 035: argument type mismatch (argument 1) - PrO.GameR - 14.12.2015

Epic bump ... 2012 topic, and I'm 100% sure your issue is not the same, just the same error
post 455 line and a couple lines higher than it.


Re: error 035: argument type mismatch (argument 1) - soosk - 03.07.2016

Hi
Help Me Please


Quote:

TextDrawSetString(AccountBar,accstr);

Quote:

C:\Users\Ali-Sahel\Desktop\Fixed\gamemodes\NFS.pwn(53894) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Quote:

new accstr[700];
format(accstr,700,"Accounts: ~y~%s ~w~(~y~%s ~w~banned) / Newest account: ~y~%s ~w~/ Most players online: ~y~%d ~w~(%s)",FormatNumber(teadadacc),FormatNumber(tead adeban),jadidacc,MostPlayersOnline,DateOfRekord);
TextDrawSetString(AccountBar,accstr);
return 1;




Re: error 035: argument type mismatch (argument 1) - Dayrion - 03.07.2016

Quote:
Originally Posted by soosk
Посмотреть сообщение
Hi
Help Me Please
Are you serious to bump a bury thread?
You have a just to make a new one.
PHP код:
TextDrawSetString(Text:textstring[]) 
This is not a string, this is a Text, that's why.


Re: error 035: argument type mismatch (argument 1) - soosk - 03.07.2016

Quote:

C:\Users\Ali-Sahel\Desktop\Fixed\gamemodes\NFS.pwn(53894) : error 017: undefined symbol "text"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

((


Re: error 035: argument type mismatch (argument 1) - soosk - 03.07.2016

bump


Re: error 035: argument type mismatch (argument 1) - Dayrion - 03.07.2016

Don't bump and read again my post. It's not "text".