ERROR , HELP!
#1

Код:
 if(sscanf(params, "i", id)) return SendClientMessage(playerid, 0xFFFFFF, "Hasznбlat: /betegfelrak [Jбtйkos ID]");
Код:
error 035: argument type mismatch (argument 1)
I have problem this line :/ PLS HELP ME!
Reply
#2

The problem is either that "params" is not an array (in sscanf) or the "playerid" is not an integer (in SendClientMessage).
Reply
#3

I don't understand you :/ , so please help me

This script...

Код:
if(strcmp(cmd,"/betegfelrak",true)==0)
{
        new id, Float:X, Float:Y, Float:Z, msg[100], msg2[30];
        if(Loaded2Hordagy[playerid] == true) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nem lehet,mikцzben a hordбgyon van!");
        if(sscanf(params, "i", id)) return SendClientMessage(playerid, 0xFFFFFF, "Hasznбlat: /betegfelrak [Jбtйkos ID]");
        if(HordagyLoaded[playerid] == true) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Mбr egyszer felraktad a hordбgyra a beteget");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nincs bejelentkezve a jбtйkos");
        if(UsingHordagy[playerid] == false || HordagySpawned[playerid] == false) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nincs hordбgyad vagy nem hasznбlod!");
 
        GetPlayerPos(id, X, Y, Z);
        if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
    {
                if(IsPlayerInAnyVehicle(id) == 1) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Ez a jбtйkos mбr a kocsiban van!");
                HordagyLoaded[playerid] = true;
                MentosID[id] = playerid;
                BetegID[playerid] = id;
                TogglePlayerControllable(id, 0);
                Loaded2Hordagy[id] = true;
               
                DestroyObject(Hordagy[playerid]);
                GetPlayerPos(playerid, X, Y, Z);
                Hordagy[playerid] = CreateObject(2146, X, Y, Z - 0.50, 0, 0, 0, 75.0);
                AttachObjectToPlayer(Hordagy[playerid], playerid, 0.00, -1.70, -0.50, 0.0, 0.0, 0.0);
                GetPlayerName(playerid, msg, sizeof(msg));
                format(msg, sizeof(msg), " * %s betolta %s-t a mentőautуba", msg, GetPlayerName(BetegID[playerid], msg2, sizeof(msg2)));
                SendNearByMessage(10.00, playerid, 0xC2A2DAAA, msg);
                return 1;
    }
                else return SendClientMessage(playerid, 0xFFFFFF, "HIBA: A jбtйkos messzevan a hordбgytуl!");
}
Reply
#4

You declared "params" as integer and it should be an array. Replace with:
pawn Код:
if(sscanf(cmdtext, "i", id)) ...
though it's recommended to use ZCMD or y_commands for commands.
Reply
#5

Download and include zcmd in your script and then paste this edited command on your script.
Код:
CMD:betegfelrak(playerid,params[])
{
  new id, Float:X, Float:Y, Float:Z, msg[100], msg2[30];
        if(Loaded2Hordagy[playerid] == true) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nem lehet,mikцzben a hordбgyon van!");
        if(sscanf(params, "i", id)) return SendClientMessage(playerid, 0xFFFFFF, "Hasznбlat: /betegfelrak [Jбtйkos ID]");
        if(HordagyLoaded[playerid] == true) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Mбr egyszer felraktad a hordбgyra a beteget");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nincs bejelentkezve a jбtйkos");
        if(UsingHordagy[playerid] == false || HordagySpawned[playerid] == false) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Nincs hordбgyad vagy nem hasznбlod!");
 
        GetPlayerPos(id, X, Y, Z);
        if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
    {
                if(IsPlayerInAnyVehicle(id) == 1) return SendClientMessage(playerid, 0xFFFFFF, "HIBA: Ez a jбtйkos mбr a kocsiban van!");
                HordagyLoaded[playerid] = true;
                MentosID[id] = playerid;
                BetegID[playerid] = id;
                TogglePlayerControllable(id, 0);
                Loaded2Hordagy[id] = true;
               
                DestroyObject(Hordagy[playerid]);
                GetPlayerPos(playerid, X, Y, Z);
                Hordagy[playerid] = CreateObject(2146, X, Y, Z - 0.50, 0, 0, 0, 75.0);
                AttachObjectToPlayer(Hordagy[playerid], playerid, 0.00, -1.70, -0.50, 0.0, 0.0, 0.0);
                GetPlayerName(playerid, msg, sizeof(msg));
                format(msg, sizeof(msg), " * %s betolta %s-t a mentőautуba", msg, GetPlayerName(BetegID[playerid], msg2, sizeof(msg2)));
                SendNearByMessage(10.00, playerid, 0xC2A2DAAA, msg);
                return 1;
    }
                else
               {
                SendClientMessage(playerid, 0xFFFFFF, "HIBA: A jбtйkos messzevan a hordбgytуl!");
                return 1;
               }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: