argument type mismatch (argument 2) [HELP]
#1

on this code :

pawn Код:
if(strcmp("/blue", cmdtext, true, 10))
    {
        SetPVarInt(playerid, 4812, 1);
        SetPVarInt(playerid, 4840, CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        SetPVarInt(playerid, 4860, CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        AttachObjectToVehicle(GetPVarInt(playerid, 4884), GetPlayerVehicleID(playerid), 3209481421, 0, 3207803699, 0, 0, 0);
        AttachObjectToVehicle(GetPVarInt(playerid, 4904), GetPlayerVehicleID(playerid), 1061997773, 0, 3207803699, 0, 0, 0);
        SendClientMessage(playerid, 0xFFFFFFAA, ".:: Green Neons installed! -1500 ::.");
        GivePlayerMoney(playerid, -1500);
        return 1;
    }
    if(strcmp(cmdtext, "/green", true) == 6)
    {
        SetPVarInt(playerid, 5040, 1);
        SetPVarInt(playerid, 5068, CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        SetPVarInt(playerid, 5092, CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        AttachObjectToVehicle(GetPVarInt(playerid, 5116), GetPlayerVehicleID(playerid), 3209481421, 0, 3207803699, 0, 0, 0);
        AttachObjectToVehicle(GetPVarInt(playerid, 5140), GetPlayerVehicleID(playerid), 1061997773, 0, 3207803699, 0, 0, 0);
        SendClientMessage(playerid, 0xFFFFFFAA, ".:: You installed Green Neons! -1500$ ::.");
        GivePlayerMoney(playerid, -1500);
        return 1;
    }
i get these errors:

Код:
 C:\Users\Kudoz\Desktop\parkour.pwn(4624) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4625) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4626) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4627) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4628) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4635) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4636) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4637) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4638) : error 035: argument type mismatch (argument 2)
C:\Users\Kudoz\Desktop\parkour.pwn(4639) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.
Need help fast!
Reply
#2

Mention each lines my boy!
Reply
#3

Код:
 SetPVarInt(playerid, 4812, 1);
        SetPVarInt(playerid, 4840, CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        SetPVarInt(playerid, 4860, CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0));
        AttachObjectToVehicle(GetPVarInt(playerid, 4884), GetPlayerVehicleID(playerid), 3209481421, 0, 3207803699, 0, 0, 0);
        AttachObjectToVehicle(GetPVarInt(playerid, 4904), GetPlayerVehicleID(playerid), 1061997773, 0, 3207803699, 0, 0, 0);
These are the 5 lines where it is error. (BLUE CMD) its the same lines on the green ones too.
Reply
#4

SetPVarInt/GetPVarInt require a string as the second argument.

https://sampwiki.blast.hk/wiki/SetPVarInt
https://sampwiki.blast.hk/wiki/GetPVarInt

Please read the above links for documentation regarding those functions.
Reply
#5

I'm new to scripting so I dont know a shiz what that means lol, sorry..
Reply
#6

that means READ the link he posted to LEARN
Reply
#7

I read it, and I said I dont really know what that means.. I'm neither english or anything..
Reply
#8

This is an example:

pawn Код:
SetPVarInt(playerid, "Test", 1);
The same parameters exist for "GetPVarInt".
Reply
#9

I don't really know what this is.. Can someone put it together right for me for rep? cuz I don't really understand what I am going to do to fix the errors.
Reply
#10

Bump. really need help! this is a usefull script for my server!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)