Pawn error.
#1

I'm making a /givecar command. However, you can own three vehicles. My /givecar params are: givecar [id] [carid] [slot]

Where "Slot" is, you can enter 1 - 2 - 3. Though, I get this error:
Код:
error 035: argument type mismatch (argument 2)
This is the line:
pawn Код:
if(!strcmp("1", slot))
Reply
#2

https://sampwiki.blast.hk/wiki/Strcmp

You're missing parameters.
Reply
#3

I don't really understand strcmp. I've tried to make one here:
Код:
if(!strcmp(slot, "1", true, 1))
But I now get arguement 1 instead of 2.
Reply
#4

strcmp is for string comparing.
1 is not a string, it's an int.
Use if(slot == 1)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)