error 006: must be assigned to an array
#5

Quote:

dini_Get returns a string, you need to use dini_IntGet.

thank but i find dini_Int and with dini_IntGet , I have the error 017: undefined symbol "dini_IntGet"
Quote:

First of all why are you reading Player Info from the ini file? Why not call your Player Variables from your PlayerInfo enum.

Most of them look like PlayerInfo[playerid][pKills] or PlayerInfo[playerid][Kills] or similar to this.

These are also used to get the value of the array assigned to it!

I'm using this with a other FS.

Код:
//Le script est fait par Jonathan1358. Version 1.4
#include <a_samp>
#include <ldudb>
#include <lfuncs>

new Text:Textdraw;
public OnFilterScriptInit()
{
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnGameModeInit()
{
	Textdraw = TextDrawCreate(350.000000,3.000000,"~Y~Score:  ~W~0  ~R~Deaths:  ~W~0  ~P~Kills:  ~W~0  ~G~TimeScore: ~W~0");
    TextDrawAlignment(Textdraw,0);
    TextDrawBackgroundColor(Textdraw,0x000000ff);
    TextDrawFont(Textdraw,2);
    TextDrawLetterSize(Textdraw,0.188888,1.100000);
    TextDrawColor(Textdraw,0xffffffff);
    TextDrawSetOutline(Textdraw,1);
    TextDrawSetProportional(Textdraw,1);
    TextDrawSetShadow(Textdraw,1);
}

public OnPlayerSpawn(playerid)
{
	new Text:newtext[255], scoretotal, killscore ,deathscore ,timescore ,file[128];
	format(file,sizeof(file),"/*********/Accounts/%s.sav",udb_encode(PlayerName2(playerid)));
    scoretotal = GetPlayerScore(playerid);
    killscore = dini_Int(file, "Kills");
    deathscore = dini_Int(file, "Deaths");
    timescore = dini_Int(file, "Hours");;
    format(newtext,sizeof(newtext), "~Y~Score:  ~W~%d  ~R~Deaths:  ~W~%d  ~P~Kills:  ~W~%d  ~G~TimeScore: ~W~%d",scoretotal, deathscore, killscore ,timescore);
    TextDrawSetString(Textdraw, newtext);
    TextDrawShowForPlayer(playerid, Textdraw);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/score", cmdtext, true, 10) == 0)
	{
	new Text:newtext[255], scoretotal, killscore ,deathscore ,timescore ,file[128];
	format(file,sizeof(file),"/********/Accounts/%s.sav",udb_encode(PlayerName2(playerid)));
   	scoretotal = GetPlayerScore(playerid);
   	killscore = dini_Int(file, "Kills");
   	deathscore = dini_Int(file, "Deaths");
   	timescore = dini_Int(file, "Hours");;
   	format(newtext,sizeof(newtext), "~Y~Score:  ~W~%d  ~R~Deaths:  ~W~%d  ~P~Kills:  ~W~%d  ~G~TimeScore: ~W~%d",scoretotal, deathscore, killscore ,timescore);
   	TextDrawSetString(Textdraw, newtext);
 	TextDrawShowForPlayer(playerid, Textdraw);
   	GameTextForPlayer(playerid,"~Y~Score Update", 1500, 3);
	return 1;
	}
	return 0;
}
Reply


Messages In This Thread
error 006: must be assigned to an array - by jonathan1358 - 04.04.2012, 22:57
Re: error 006: must be assigned to an array - by JaTochNietDan - 05.04.2012, 02:43
Re: error 006: must be assigned to an array - by Ballu Miaa - 05.04.2012, 03:33
Re: error 006: must be assigned to an array - by DarkScripter - 05.04.2012, 03:53
Re: error 006: must be assigned to an array - by jonathan1358 - 05.04.2012, 03:54
Re: error 006: must be assigned to an array - by Ballu Miaa - 05.04.2012, 04:23
Re: error 006: must be assigned to an array - by Psymetrix - 05.04.2012, 04:29
Re: error 006: must be assigned to an array - by Ezay - 05.04.2012, 04:42

Forum Jump:


Users browsing this thread: 1 Guest(s)