pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Geso - 09.09.2010
I've got a big problem, now that i got myself a VPS with Centos. All the pInfo[MAX_PLAYERS][PlayerInfo] things seem not to work, everything stays on 0. Now this problem is in my gamemode, but they do work in my admin filterscript.
How to solve this?
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Geso - 10.09.2010
So, anyone?
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
legodude - 10.09.2010
firstly i scripted them as PVars but that didnt work either .. if that helps
This forum requires that you wait 120 seconds between posts. Please try again in 28 seconds.
FCK THE WAITING TIME RAAAH!!!
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Slice - 10.09.2010
Make sure you didn't upload it to the FTP server in ASCII mode.
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Geso - 11.09.2010
Код:
public OnPlayerConnect(playerid)
{
new playerfile[256];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
format(playerfile,sizeof(playerfile),"/Casino/%s",PlayerName);
if(!dini_Exists(playerfile))
{
dini_Create(playerfile);
dini_IntSet(playerfile, "VIP", 0);
dini_IntSet(playerfile, "Caddy", 0);
dini_IntSet(playerfile, "FreeDrinks", 0);
dini_IntSet(playerfile, "Staff", 0);
}
//SetPVarInt(playerid, "VIP", dini_Int(playerfile, "VIP"));
pInfo[playerid][VIP] = dini_Int(playerfile, "VIP");
//SetPVarInt(playerid, "Caddy", dini_Int(playerfile, "Caddy"));
pInfo[playerid][Caddy] = dini_Int(playerfile, "Caddy");
//SetPVarInt(playerid, "FreeDrinks", dini_Int(playerfile, "FreeDrinks"));
pInfo[playerid][FreeDrinks] = dini_Int(playerfile, "FreeDrinks");
//SetPVarInt(playerid, "Staff", dini_Int(playerfile, "Staff"));
pInfo[playerid][Staff] = dini_Int(playerfile, "Staff");
//SetPVarInt(playerid, "LotteryNumber", 0);
pInfo[playerid][LotteryNumber] = dini_Int(playerfile, "LotteryNumber");
return 1;
}
The files do say that the var's are positive, but ingame everything's negative.
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Geso - 12.09.2010
Oh c'mon, there should be somebody knowing the answer, right?
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
willsuckformoney - 12.09.2010
mind posting your
enum PlayerInfo
and the
new pInfo[MAX_PLAYERS][PlayerInfo]
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Ash. - 12.09.2010
I also use CentOS (on a dedicated server but its pretty much the same) - Ive never had this problem, although i have noticed that using arrays like that is definetly slower on linux. To get around this, i gave the samp03svr file the directory permission 777. This allowed it to do what it can do anyway. However that did significantly speed up the loading of gamemodes, filterscripts and plugins. Maybe you should try it for the problem above.
Have you tested your problem on a windows server? It might be worth doing so if you havent. It may be a code problem.
Are you running the samp03svr server as root? I really hope not

- If you are create a new user and run it via that user.
Hope i helped
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Flo_White - 12.09.2010
how should this line work?
pawn Код:
format(playerfile,sizeof(playerfile),"/Casino/%s",PlayerName);
shouldnt it be at least PlayerName(playerid) ? and %s.ini ?
Re: pInfo[MAX_PLAYERS][PlayerInfo] won't work in Linux? -
Geso - 12.09.2010
Quote:
Originally Posted by funky1234
I also use CentOS (on a dedicated server but its pretty much the same) - Ive never had this problem, although i have noticed that using arrays like that is definetly slower on linux. To get around this, i gave the samp03svr file the directory permission 777. This allowed it to do what it can do anyway. However that did significantly speed up the loading of gamemodes, filterscripts and plugins. Maybe you should try it for the problem above.
Have you tested your problem on a windows server? It might be worth doing so if you havent. It may be a code problem.
Are you running the samp03svr server as root? I really hope not  - If you are create a new user and run it via that user.
Hope i helped 
|
So i set the permissions for samp03svr.exe but now the problem has switched to the admin filterscript in some way. The vars in the gamemode now work, but the ones in the fs don't.

?