Login System
#1

Can anyone figure this out?
Код:
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(40) : error 017: undefined symbol "pInfo"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(40) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(58) : error 017: undefined symbol "pPass"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(58) : warning 215: expression has no effect
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(58) : error 001: expected token: ";", but found "]"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(58) : error 029: invalid expression, assumed zero
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(58) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Код:
Line 40: new PlayerInfo[MAX_PLAYERS][pInfo];
Line 58: INI_String("Password",PlayerInfo[playerid][pPass], 129);
+REP for any help.
Reply
#2

Put this above new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
enum pInfo
{
    pPass
};
Reply
#3

pawn Код:
enum pInfo{
 money,
 pPass[129]
 // more data can be added here
};
new PlayerInfo[MAX_PLAYERS][pInfo];
put the enum above line 40.
Reply
#4

I've done that and i now get these errors
Код:
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : warning 215: expression has no effect
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : error 001: expected token: ";", but found "-string-"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : warning 215: expression has no effect
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(328) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
and the line is:
Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"{F81414}Login",""COLOR_WHITE"\nType Your Password Below To Login","Login","Quit");
Reply
#5

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}Login","\nType Your Password Below To Login","Login","Quit");
Reply
#6

Using colours like that in texts must be defined as: "{RRGGBB}"
If the colour is defined as a number such as: 0xRRGGBBAA and you use it inside a text will result to the errors you got.

So:
pawn Код:
#define COL_WHITE "{FFFFFF}"
and
pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"\nType Your Password Below To Login","Login","Quit");
Reply
#7

2 Warnings now.
Код:
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(380) : warning 204: symbol is assigned a value that is never used: "szString"
C:\Users\Shane\Desktop\SA-MP\gamemodes\test.pwn(671) : warning 203: symbol is never used:
"gPlayerLogged"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Код:
 new
Line 380: szString[64],

and line 671 is the bottom of the script (line 671 Don't exist)
Reply
#8

Declaring a string/array without using it in anything will give the warning. The same goes for the other global symbol. Use them and they will disappear or if you don't want to use them on anything, just remove them.
Reply
#9

Problem solved. Thanku
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)