error 035: argument type mismatch (argument 1)
#1

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.
Reply
#2

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

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.
Reply
#4

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

+REP to Calgon
Reply
#5

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..
Reply
#6

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.

Reply
#7

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.
Reply
#8

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;

Reply
#9

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.
Reply
#10

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.

((
Reply
#11

bump
Reply
#12

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


Forum Jump:


Users browsing this thread: 1 Guest(s)