fast err file error
#1

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 039: constant symbol has no size
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : warning 213: tag mismatch

pawn Код:
new file[100]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
S:
Reply
#2

Have u got the variable name declared? eg
pawn Код:
new Name[MAX_PLAYER_NAME];
i use this function for playernames.

pawn Код:
stock playername(playerid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    return pname;
}
Reply
#3

pawn Код:
new name[24], fname[100];
GetPlayerName(playerid, name, sizeof(name));
format(fname, sizeof(fname), PlayerFile, name);
use coding conventions and you might find your errors easier
Reply
#4

Quote:
Originally Posted by Kar
Посмотреть сообщение
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 039: constant symbol has no size
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : warning 213: tag mismatch

pawn Код:
new file[100]; format(file,sizeof(file),PlayerFile,playername(playerid));
S:
--------
Reply
#5

they are there.. look o.o
pawn Код:
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3610) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3610) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3610) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3610) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3610) : warning 204: symbol is assigned a value that is never used: "Name"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : warning 204: symbol is assigned a value that is never used: "Name"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3691) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3691) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3691) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3691) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3691) : warning 204: symbol is assigned a value that is never used: "Name"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3873) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3873) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3873) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3873) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3873) : warning 204: symbol is assigned a value that is never used: "Name"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3917) : warning 204: symbol is assigned a value that is never used: "Name"

all of them are on these lines

pawn Код:
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
pawn Код:
enum PLAYER_MAIN {
    Deposit,
};
new pInfo[MAX_PLAYERS][PLAYER_MAIN];
new chosenpid;
#define PlayerFile  "Bank/%s.ini"
Reply
#6

Replace PlayerFile to "Bank/%s.ini", I don't see a possibility to format pre-formatted strings.
Reply
#7

Try changing the name of the Name[MAX_PLAYERS] to something else like Playaname[MAX_PLAYERS].

And like bigcomfycouch use seperate lines like
pawn Код:
new file[100],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(file,sizeof(file),PlayerFile,Name);

So you can see exactly where your error are.
Reply
#8

i got it dowqn to this

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3609) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3636) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3692) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3875) : warning 213: tag mismatch
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3920) : warning 213: tag mismatch

on lines

pawn Код:
format(file,sizeof(file),PlayerFile,Name);
[edit] hiddos what to replace it as?
Reply
#9

Separate lines don't change anything.

To me it seems that you're not using a string for your playername, but just a normal integer variable
Reply
#10

pawn Код:
format(file,sizeof(file),Bank/%s.ini,Name);
Damnit, sorry for dual-posting. Didn't mention it.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)