enum qinfo { quest1, } new qInfo[MAX_PLAYERS][qinfo];
public OnPlayerConnect(playerid) { quest1[playerid] = 0; // ERROR LINE
new PName[MAX_PLAYER_NAME]; new file[128]; GetPlayerName(playerid, PName, MAX_PLAYER_NAME); format(file, sizeof(file), PLAYERFILE, udb_encode(PName)); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "quest1", 0); } qInfo[playerid][quest1] = dini_Int(file, "quest1"); } }
dini_IntSet(file, "quest1", PInfo[playerid][quest1]); qInfo[playerid][quest1] = 0;
C:\Documents and Settings\ED\Desktop\Jauna mape\servaks 2\samp03svr_RC10-1_win32\gamemodes\AlienInvasion.pwn(161) : error 028: invalid subscript (not an array or too many subscripts): "quest1" C:\Documents and Settings\ED\Desktop\Jauna mape\servaks 2\samp03svr_RC10-1_win32\gamemodes\AlienInvasion.pwn(161) : warning 215: expression has no effect C:\Documents and Settings\ED\Desktop\Jauna mape\servaks 2\samp03svr_RC10-1_win32\gamemodes\AlienInvasion.pwn(161) : error 001: expected token: ";", but found "]" C:\Documents and Settings\ED\Desktop\Jauna mape\servaks 2\samp03svr_RC10-1_win32\gamemodes\AlienInvasion.pwn(161) : error 029: invalid expression, assumed zero C:\Documents and Settings\ED\Desktop\Jauna mape\servaks 2\samp03svr_RC10-1_win32\gamemodes\AlienInvasion.pwn(161) : fatal error 107: too many error messages on one line
qInfo[playerid][quest1] = 0;
enum qinfo
{
quest1,
}
new qInfo[MAX_PLAYERS][qinfo];
public OnPlayerConnect(playerid)
{
qInfo[playerid][quest1] = 0;
return 1;
}
Originally Posted by dice7
If your code is like this
pawn Код:
|
savequest(playerid) { new PName[MAX_PLAYER_NAME]; new file[128]; GetPlayerName(playerid, PName, MAX_PLAYER_NAME); format(file, sizeof(file), PLAYERFILE, udb_encode(PName)); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "quest1", 0); } qInfo[playerid][quest1] = dini_Int(file, "quest1"); return 1; }
qInfo[playerid][quest1] = 0;
dini_IntSet(file, "quest1", PInfo[playerid][quest1]);//error qInfo[playerid][quest1] = 0;
0-1_win32\gamemodes\AlienInvasion.pwn(707) : error 017: undefined symbol "file"