Login System Help -
Mattakil - 07.09.2013
All of the sudden, i've been having a shitton of login problems (it always says wrong pass) I fixed the issue...Then realized I had the password set to a interval instead of a string. I was getting an error. Also, when I set the floats to spawn, I get a warning. The warnings are to do with the 3 floats, and the error is on the password line. Please help, and +1 Rep goes to anyone who replies positively
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player Info");
INI_WriteInt(File, "Paycheck", PlayerInfo[playerid][pPaycheck] = 60);
INI_WriteInt(File, "Level", PlayerInfo[playerid][pLevel] = 1);
INI_WriteInt(File, "Hours", PlayerInfo[playerid][pHours]);
INI_WriteInt(File, "Job", PlayerInfo[playerid][pJob] = 0);
INI_WriteFloat(File, "Spawn X",PlayerInfo[playerid][pSpawnX] = 1242.0341);
INI_WriteFloat(File, "Spawn Y",PlayerInfo[playerid][pSpawnY] = 327.7363);
INI_WriteFloat(File, "Spawn Z",PlayerInfo[playerid][pSpawnZ] = 19.7555);
INI_WriteInt(File, "Admin",PlayerInfo[playerid][pAdmin] = 0);
INI_WriteInt(File, "Banned",PlayerInfo[playerid][pBanned] = 0);
INI_WriteInt(File, "Spawn", PlayerInfo[playerid][pSpawn] = 1);
INI_WriteString(File, "Password", PlayerInfo[playerid][pPass] = strval(inputtext));
INI_WriteInt(File, "Bank", PlayerInfo[playerid][pBank] = 0);
INI_WriteInt(File, "Food", PlayerInfo[playerid][pFood] = 1200);
INI_WriteInt(File, "Water", PlayerInfo[playerid][pWater] = 1200);
INI_Close(File);
Код:
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(123) : warning 213: tag mismatch
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(124) : warning 213: tag mismatch
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(125) : warning 213: tag mismatch
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(129) : error 035: argument type mismatch (argument 3)
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(949) : warning 213: tag mismatch
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(950) : warning 213: tag mismatch
C:\Users\Matt\Desktop\Games\GTA_SA\SAMP\gamemodes\Survival.pwn(951) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: YINI Errors -
Mattakil - 07.09.2013
The goddamn password is showing incorrect, im not sure if this is an issue with because its compiled on WriteInt? But when I go into my scriptfiles, the password shows correctly.
EDIT: I played around with some things, and the password system works now. Still would like to fix the warnings, and the Int to String issue.
Re: YINI Errors -
Omar55555 - 07.09.2013
show us the lines that have the warnings and the errors
and btw u know u can complie it ??
Re: YINI Errors -
Mattakil - 07.09.2013
Quote:
Originally Posted by Omar55555
show us the lines that have the warnings and the errors
and btw u know u can complie it ??
|
The lines of error are on there, The Float strings are the warnings, and the error is the password string. I can compile if I change "INI_WriteString" to INI_WriteInt, but that is an integer, and your password wont always be an integer..also for some reason, if you /q, it will set your password to "t/q"
Re: YINI Errors -
Dragonsaurus - 07.09.2013
This does not make any sense, you are storing the positions inside variables and saving that whole thing... of course will give errors, try to remove the "= 1232.123123" things and recompile.
pawn Код:
INI_WriteFloat(File, "Spawn X",PlayerInfo[playerid][pSpawnX]);
INI_WriteFloat(File, "Spawn Y",PlayerInfo[playerid][pSpawnY]);
INI_WriteFloat(File, "Spawn Z",PlayerInfo[playerid][pSpawnZ]);
Also for the password issue, you are doing the same as above, choose one of them: strval(inputtext) or your global variable to store the password.
Technically, you are assigning the values in the same line as saving them.
Re: YINI Errors -
Mattakil - 07.09.2013
Quote:
Originally Posted by Dragonsaurus
This does not make any sense, you are storing the positions inside variables and saving that whole thing... of course will give errors, try to remove the "= 1232.123123" things and recompile.
pawn Код:
INI_WriteFloat(File, "Spawn X",PlayerInfo[playerid][pSpawnX]); INI_WriteFloat(File, "Spawn Y",PlayerInfo[playerid][pSpawnY]); INI_WriteFloat(File, "Spawn Z",PlayerInfo[playerid][pSpawnZ]);
Also for the password issue, you are doing the same as above, choose one of them: strval(inputtext) or your global variable to store the password.
Technically, you are assigning the values in the same line as saving them.
|
Thank you..I guess thats what I get from learning from a novice scripter xD
+rep
Re: YINI Errors -
Dragonsaurus - 07.09.2013
You are welcome.
PS: Am I being too rude? Not intentionally if I really was...
Re: YINI Errors -
Mattakil - 07.09.2013
Quote:
Originally Posted by Dragonsaurus
You are welcome.
PS: Am I being too rude? Not intentionally if I really was...
|
I didnt notice you being rude :P