[HELP] quick help would be appreciated
#1

please help

Код:
95 public OnPlayerDisconnect(playerid, reason)
96 {
97    //Same as OnDialogResponse, we will save their stats inside of their user's account
98        new INI:file = INI_Open(Path(playerid)); //will open their file
99		INI_SetTag(file,"Player's Data");
100		INI_WriteInt(file,"Adminlevel",PlayerInfo[playerid][Adminlevel]); 
101		INI_WriteInt(file,"VIPLevel",PlayerInfo[playerid][VIPLevel]);
102		INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
103		INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
104		INI_WriteInt(file,"Kills", PlayerInfo[playerid][Kills]);
105		INI_WriteInt(file,"Deaths",PlayerInfo[playerid][Deaths]);
106		INI_WriteFloat(file,"LastX", GetPlayerPos(playerid, Float:x));
107		INI_WriteFloat(file,"LastY", GetPlayerPos(playerid, Float:y));
108		INI_WriteFloat(file,"LastZ", GetPlayerPos(playerid, Float:z));
109		INI_WriteFloat(file,"Armour", GetPlayerArmour(playerid));
110		INI_WriteFloat(file,"Health", GetPlayerHealth(playerid));
111		INI_WriteInt(file,"Interior", GetPlayerInterior(playerid));
112		INI_WriteInt(file,"VW", GetPlayerVirtualWorld(playerid));
113		INI_WriteInt(file,"Skin", GetPlayerSkin(playerid));
114		INI_Close(file);
115	return 1;
116}
Here's with lines

and errors:
Код:
new.pwn(95) : warning 217: loose indentation
new.pwn(95) : error 029: invalid expression, assumed zero
new.pwn(95) : error 004: function "S@@_OnPlayerDisconnect" is not implemented
new.pwn(100) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
new.pwn(100) : warning 215: expression has no effect
new.pwn(100) : error 001: expected token: ";", but found "]"
new.pwn(100) : error 029: invalid expression, assumed zero
new.pwn(100) : fatal error 107: too many error messages on one line
Reply
#2

Post the lines.
Reply
#3

Why would you want to save the password when the player disconnects? Write it when he registers or wants to change it

pawn Код:
INI_WriteString(file,"Password", 21);
And do it without the []
Reply
#4

Код:
95 public OnPlayerDisconnect(playerid, reason)
96 {
97    //Same as OnDialogResponse, we will save their stats inside of their user's account
98        new INI:file = INI_Open(Path(playerid)); //will open their file
99		INI_SetTag(file,"Player's Data");
100		INI_WriteInt(file,"Adminlevel",PlayerInfo[playerid][Adminlevel]); 
101		INI_WriteInt(file,"VIPLevel",PlayerInfo[playerid][VIPLevel]);
102		INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
103		INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
104		INI_WriteInt(file,"Kills", PlayerInfo[playerid][Kills]);
105		INI_WriteInt(file,"Deaths",PlayerInfo[playerid][Deaths]);
106		INI_WriteFloat(file,"LastX", GetPlayerPos(playerid, Float:x));
107		INI_WriteFloat(file,"LastY", GetPlayerPos(playerid, Float:y));
108		INI_WriteFloat(file,"LastZ", GetPlayerPos(playerid, Float:z));
109		INI_WriteFloat(file,"Armour", GetPlayerArmour(playerid));
110		INI_WriteFloat(file,"Health", GetPlayerHealth(playerid));
111		INI_WriteInt(file,"Interior", GetPlayerInterior(playerid));
112		INI_WriteInt(file,"VW", GetPlayerVirtualWorld(playerid));
113		INI_WriteInt(file,"Skin", GetPlayerSkin(playerid));
114		INI_Close(file);
115	return 1;
116}
Here's with lines

and errors:
Код:
new.pwn(95) : warning 217: loose indentation
new.pwn(95) : error 029: invalid expression, assumed zero
new.pwn(95) : error 004: function "S@@_OnPlayerDisconnect" is not implemented
new.pwn(100) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
new.pwn(100) : warning 215: expression has no effect
new.pwn(100) : error 001: expected token: ";", but found "]"
new.pwn(100) : error 029: invalid expression, assumed zero
new.pwn(100) : fatal error 107: too many error messages on one line
Reply
#5

updated
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)