[HELP] Cant fix this, help...
#1

I get thise errors...

1,
Код:
undefined symbol "playrname"
2,
Код:
undefined symbol "playrname"
3,
Код:
invalid expression, assumed zero
4,
Код:
too many error messages on one line
All errors are from Line 77.

Here is my script, http://pastebin.com/f70fe40c0

Thanks so mutch for the help

Reply
#2

Declare it.
Reply
#3

You should learn some basics first.

And like 0rb said, declare it:
new playrname[MAX_PLAYER_NAME];
Reply
#4

Probably you just misspelled it. Try playername.
Reply
#5

Quote:
Originally Posted by Don Correlli
You should learn some basics first.

And like 0rb said, declare it:
new playrname[MAX_PLAYER_NAME];
I did, but it didnt work
Reply
#6

Well, it works with
Код:
new playrname[MAX_PLAYER_NAME];
But when I putted that in, it want
Код:
new connect[128];
When I put it right under playrname, it gives me 20 errors...
Reply
#7

Oh, i see you're formatting player's account with 'connect'.
Try:
pawn Код:
new connect[64];
MAX_PLAYER_NAME has size of 24 cells, i think that is too small for formatting in your case.
Reply
#8

Here is the full script where the 4 errors comes from.

Код:
public OnPlayerConnect(playerid)
{
  new playrname[MAX_PLAYER_NAME];
  new connect[128];
	GetPlayerName(playerid, playrname, sizeof(playrname));
	format(connect, sizeof(connect), "%s.ini", playrname);
	if(fexist(connect))
	{
		gPlayerAccount[playerid] = 1;
		SendClientMessage(playerid, COLOR_YELLOW, "You are registered, please login with /login password");
		return 1;
	}
	else
	{
		gPlayerAccount[playerid] = 0;
		SendClientMessage(playerid, COLOR_YELLOW, "You are new here or not registered, please register with /register password");
	}

	return 1;
}
It dont want the line
Код:
new connect[128];
to be there, the full script goes nuts if I keep new connect[128]; there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)