Login System - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Login System (
/showthread.php?tid=508539)
Login System -
ShaneOvSina - 22.04.2014
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.
Re: Login System -
doreto - 22.04.2014
Put this
above new PlayerInfo[MAX_PLAYERS][pInfo];
Re: Login System -
klimgorilla - 22.04.2014
pawn Код:
enum pInfo{
money,
pPass[129]
// more data can be added here
};
new PlayerInfo[MAX_PLAYERS][pInfo];
put the enum above line 40.
Re: Login System -
ShaneOvSina - 22.04.2014
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");
Re: Login System -
klimgorilla - 22.04.2014
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}Login","\nType Your Password Below To Login","Login","Quit");
Re: Login System -
Konstantinos - 22.04.2014
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");
Re: Login System -
ShaneOvSina - 22.04.2014
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)
Re: Login System -
Konstantinos - 22.04.2014
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.
Re: Login System -
ShaneOvSina - 22.04.2014
Problem solved. Thanku