Problem rank
#10

The database is 0-9 ranks. Loaded ranks 0-5 why?
Code:
forward LoadRank();
public LoadRank()
{
	new query[500], id, type, ranks[256], rank[MAX_RANG][MAX_RANG_LEN];

	new results = cache_num_rows();

	if(results > 0)
	{
		for(new i = 0; i < results; i++)
		{
			cache_get_value_int(i, "ID", id);
			cache_get_value_int(i, "type", type);
			cache_get_value_name(i, "ranks", ranks, MAX_RANG_LEN);

			sscanf(query, "p<|>dds[256]", id, type, ranks);
			sscanf(ranks, "p<,>A<s[25]>()[10]", rank);

            if(type == 1)
            {
                for(new j = 0; j < MAX_RANG; j++)
                {
                    if(strlen(rank[j]) > 1) format(FracRang[id][j], 25, "%s", rank[j]);
                }
            }
		}
		print("Ranks were read");
	}
	else
	{

	}
	return 1;
}
Reply


Messages In This Thread
Problem rank - by KamilPolska - 01.04.2019, 15:46
Re: Problem rank - by YenTy - 02.04.2019, 12:07
Re: Problem rank - by KamilPolska - 02.04.2019, 17:00
Re: Problem rank - by KamilPolska - 02.04.2019, 18:25
Re: Problem rank - by YenTy - 02.04.2019, 18:48
Re: Problem rank - by KamilPolska - 02.04.2019, 19:21
Re: Problem rank - by KamilPolska - 02.04.2019, 21:12
Re: Problem rank - by YenTy - 02.04.2019, 21:41
Re: Problem rank - by KamilPolska - 02.04.2019, 22:56
Re: Problem rank - by KamilPolska - 03.04.2019, 16:46
Re: Problem rank - by Logic_ - 03.04.2019, 18:04
Re: Problem rank - by KamilPolska - 03.04.2019, 18:36
Re: Problem rank - by KamilPolska - 04.04.2019, 14:46
Re: Problem rank - by KamilPolska - 04.04.2019, 18:10
Re: Problem rank - by Logic_ - 04.04.2019, 18:43
Re: Problem rank - by KamilPolska - 05.04.2019, 16:26

Forum Jump:


Users browsing this thread: 2 Guest(s)