18.06.2011, 06:35
can i delete the 'p'? like replace from this: pScore,pCash,pAdminLevel
to this:Score,Cash,AdminLevel
to this:Score,Cash,AdminLevel
Code:
C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\RCRP.pwn(409) : warning 219: local variable "tmp" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 017: undefined symbol "gPlayerLogged" C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : warning 215: expression has no effect C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 001: expected token: ";", but found "]" C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 029: invalid expression, assumed zero C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
new PlayerInfo[MAX_PLAYERS] [pInfo]; new gPlayerLogged[MAX_PLAYERS];
you have to delete the new tmp at line 409
EDIT: I have noticed that OnPlayerDisconnect you need to replace this dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "Money",PlayerInfo[playerid][pMoney]); with this: dini_IntSet(file, "Score", GetPlayerScore(playerid)); dini_IntSet(file, "Money", GetPlayerMoney(playerid)); Because the money is not saving properly or it is not saving at all if you leave this. |
public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Khaos Register", "Welcome, You're not registered!, Register to play!", "Register", "Leave"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Khaos Register", "Registered Complete. Now login", "Login", "Leave"); } }
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 017: undefined symbol "gPlayerLogged" C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : warning 215: expression has no effect C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 001: expected token: ";", but found "]" C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 029: invalid expression, assumed zero C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
new PlayerInfo[MAX_PLAYERS] [pInfo]; new gPlayerLogged[MAX_PLAYERS];