argument type mismatch (argument 2)
#1

Hi samp,

I have a problem

i tried to add a coins system to my house system.

and i got theese errors
Код:
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(143) : warning 219: local variable "Name" shadows a variable at a preceding level
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(143) : error 035: argument type mismatch (argument 2)
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(143) : error 035: argument type mismatch (argument 2)
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(143) : warning 213: tag mismatch
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(146) : warning 217: loose indentation
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(143) : warning 204: symbol is assigned a value that is never used: "Name"
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(153) : warning 219: local variable "Name" shadows a variable at a preceding level
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(153) : error 035: argument type mismatch (argument 2)
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(153) : error 035: argument type mismatch (argument 2)
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(153) : warning 213: tag mismatch
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(153) : warning 204: symbol is assigned a value that is never used: "Name"
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(2105) : warning 203: symbol is never used: "amount"
D:\1 NTFS\San Holod\scb(@)-cool one\filterscripts\new2.pwn(2105) : warning 203: symbol is never used: "giveplayerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
the lines are those with new file


Код:
public OnPlayerConnect(playerid)
{
        new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
        if(!dini_Exists(file)) {
            dini_Create(file);
                dini_IntSet(file,"Coins", pInfo[playerid][Coins]);
        }
        pInfo[playerid][Coins] = dini_Int(file,"Coins");
        return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
        new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
        dini_IntSet(file,"Coins", pInfo[playerid][Coins]);
        return 1;
}
whats the problem
Reply
#2

can someone help me?
Reply
#3

come on plss
Reply
#4

please help me. One day has passed away and my problem isn't solved
Reply
#5

what is line 143
Reply
#6

Tag mis match usually happens when your cords or somethings are not on a proper places, plus show us the line breifly and clearly so we can help you.
Reply
#7

Dude, you may only bumb your post a certain amount of time apart... If im correct its 24 hours... Well at least that is what i have followed... :P... And

Quote:

new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);

Is the line your having problems with...

use
Quote:

new file[100],Name[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name);

The tell us which line has problems...
Reply
#8

all same errors

Код:
public OnPlayerConnect(playerid)
{

 new file[100],Name[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name);
        if(!dini_Exists(file)) {
            dini_Create(file);
                dini_IntSet(file,"Coins", pInfo[playerid][Coins]);
        }
        pInfo[playerid][Coins] = dini_Int(file,"Coins");
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
           new file[100],Name[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name);
        dini_IntSet(file,"Coins", pInfo[playerid][Coins]);
	new PlayerName[MAX_PLAYER_NAME], str[128];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return 1;
}
Код:
GetPlayerName(playerid,Name,sizeof(Name));
this line has the errors
Reply
#9

Change these,
Quote:

new file[100],Name[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name);

To
Quote:

new file[100],Name1[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name1,sizeof(Name1));
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name1);

Then, I believe you got it... I think you already had "Name" defined somewhere else...
Reply
#10

now it says that


undefined symbol "PlayerFile"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)