Help voting system not working properly [URGENT]
#2

Quote:
Originally Posted by legho
Посмотреть сообщение
i have made a simple map voting system, player presses enter votes for there map then when the voting is finished the server loads the map.

when the player votes for say map 2 it says map 0 loaded
can anybody help me please
im willing to give a small donation if anyone can help

http://pastebin.com/yUR3LUFN
Код:
for (new i=0; i <sizeof(MapVoted); ++i)
    {
        if (MapVoted[i] > value) value = MapVoted[i]+1; //+1 because map ids start from 1 and not 0
Why do you start the loop from 0 then? Plus I've never seen ++i in a loop before, its usually i++, I am not sure if it would make a difference.
Reply


Messages In This Thread
Help voting system not working properly [URGENT] - by legho - 12.01.2016, 20:38
Re: Help voting system not working properly [URGENT] - by -CaRRoT - 13.01.2016, 02:11
Re: Help voting system not working properly [URGENT] - by BiosMarcel - 13.01.2016, 09:38
Re: Help voting system not working properly [URGENT] - by legho - 13.01.2016, 11:26

Forum Jump:


Users browsing this thread: 1 Guest(s)