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

Hi, well i am putting RyDeR's racing system, into my own GM.(i like to have, everything in one place) So im putting it down piece by piece, compiling it after every piece and seeing that there were no errors, just a couple of warnings(non used strings yet). So i get to this command, and well its the first thing that has SendClientMessage and the Pawn starts acting up on it, i put more commands it acts up on all of them too.. My script has SendClientMessage in it already, and those dont give no errors, but these. The original filterscript compiles with no errors. Heres the command, where the error occurs(it occurs on every single lines, where it sens a message).:

pawn Код:
CMD:buildrace(playerid, params[])
{
//  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "<!> You are not an administrator!");
    if(GetPVarInt(playerid, "Adminas") < 5)
    {
        SendClientMessage(playerid, RED, "<!> You are not an administrator!");
        return 1;
    }
    if(BuildRace != 0) return SendClientMessage(playerid, RED, "<!> There's already someone building a race!");
    if(RaceBusy == 0x01) return SendClientMessage(playerid, RED, "<!> Wait first till race ends!");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "<!> Please leave your vehicle first!");
    BuildRace = playerid+1;
    ShowDialog(playerid, 599);
    return 1;
}
Error lines:

Код:
(1761) : error 035: argument type mismatch (argument 2)
(1764) : error 035: argument type mismatch (argument 2)
(1765) : error 035: argument type mismatch (argument 2)
(1766) : error 035: argument type mismatch (argument 2)
(7706) : warning 204: symbol is assigned a value that is never used: "CountAmount"
(7882) : warning 204: symbol is assigned a value that is never used: "FinishCount"
(7701) : warning 204: symbol is assigned a value that is never used: "Position"
(7878) : warning 204: symbol is assigned a value that is never used: "RaceStarted"
(7879) : warning 204: symbol is assigned a value that is never used: "RaceTick"
(7883) : warning 204: symbol is assigned a value that is never used: "TimeProgress"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Anyone know what is going on?
Reply
#2

What does this show?
pawn Код:
BuildRace = playerid+1;
And while getting from the file are you sure you are writing it all correct, thats case sensitive. And also make sure you have dialogid == 599
Reply
#3

You can't just put it by parts, add all of it and then complie, if you get errors then fix them. I just won't work by parts.

As you can see this error "symbol is assigned a value that is never used: "CountAmount"" clearly says that your not making use of "CountAmount", and that's why you have to add all of it.

Just go with it, and if you get errors just fix them, simple as that.
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
You can't just put it by parts, add all of it and then complie, if you get errors then fix them. I just won't work by parts.

As you can see this error "symbol is assigned a value that is never used: "CountAmount"" clearly says that your not making use of "CountAmount", and that's why you have to add all of it.

Just go with it, and if you get errors just fix them, simple as that.
And you think these warnings interrup a compilation?
Reply
#5

Quote:
Originally Posted by Laurey
Посмотреть сообщение
What does this show?
pawn Код:
BuildRace = playerid+1;
And while getting from the file are you sure you are writing it all correct, thats case sensitive. And also make sure you have dialogid == 599
That function, just says that someone is already doing the race, so that any more players would not be able to create a race, or it would bug.

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
You can't just put it by parts, add all of it and then complie, if you get errors then fix them. I just won't work by parts.

As you can see this error "symbol is assigned a value that is never used: "CountAmount"" clearly says that your not making use of "CountAmount", and that's why you have to add all of it.

Just go with it, and if you get errors just fix them, simple as that.
Well, at first i tried putting all of the script in, and got all the error messages on SendClientMessage, which would not make sense..
Reply
#6

I dont know why are you using BuildRace = playerid+1, it returns true on 1 and false on 0 so BuildRace = 1; should have been done, and rather than getting Admin level from file its far better to take it from their enums and public variables.
Reply
#7

Quote:
Originally Posted by Laurey
Посмотреть сообщение
And you think these warnings interrup a compilation?
They may not interrupt the compilation, but they are just a waste of data and extremely unnecessary. I'm getting quite annoyed at people that just tell others to 'ignore the warnings'...

I don't know what lines are 1761 - 1766, but it looks like you may not have closed something properly. Possibly another command.
Reply
#8

Ignore the warnings, as long as you add the rest of the code, they'll be gone.

As for the error 035, it seems that RED is not integer as it should be so either re-define it correctly or use your own color.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)