laoding
#1

hello guys it still no works
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
 	dUserINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
 	dUserINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
	dUserINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
	dUserINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
	dUserINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
	dUserINT(PlayerName(playerid)).("SWAT",CanUseSWAT[playerid]);
	dUserINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
	dUserINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
	dUserINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
	dUserINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
	dUserINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
	dUserINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
	dUserINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
	dUserINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
	dUserINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
	dUserINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
    return 1;
}
Warning Gm and server works only i don't want warning and me SCore dont save
Код:
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2234) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2235) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2236) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2237) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2238) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2239) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2240) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2241) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2242) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2243) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2244) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2245) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2246) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2247) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2248) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2249) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


16 Warnings.
And here Is OnPlayerDissconect
Код:
	if(PLAYERLIST_authed[playerid] == 1)
	{
		dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
		dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
		dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
	 	dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
		dUserSetINT(PlayerName(playerid)).("SWAT",CanUseSWAT[playerid]);
		dUserSetINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
		dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
		dUserSetINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
		dUserSetINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
		dUserSetINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
		dUserSetINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
		return 1;
	}
Please help ??
Reply
#2

pawn Код:
dUserINT
is used to get the data.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    BankCash[i] = dUserINT(PlayerName(i)).("Bankcash");
    GivePlayerMoney(i, dUserINT(PlayerName(i)).("Cash"));
    SetPlayerScore(i, dUserINT(PlayerName(i)).("Score");
    // Continue like above
    return 1;
}
I would also not recomment a for loop for loading.

________

It should be
pawn Код:
// OnPlayerConnect(playerid)
// Get player name
// if( name = not registered ) -> create new file
// else load data, by using
BankCash[playerid]= dUserINT(PlayerName(playerid)).("Bankcash");
GivePlayerMoney(playerid, dUserINT(PlayerName(playerid)).("Cash"));
SetPlayerScore(playerid, dUserINT(PlayerName(playerid)).("Score");
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)