Doesn't read the first row in the database
#1

Solved.
Reply
#2

Change vehicles = 0 to vehicles = -1
Reply
#3

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
Change vehicles = 0 to vehicles = -1
You can't read/set factionvehicles[-1]...
Reply
#4

Quote:
Originally Posted by Incubator
Посмотреть сообщение
You can't read/set factionvehicles[-1]...
vehicles++ will be 0 in the first iteration.
Reply
#5

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
vehicles++ will be 0 in the first iteration.
That's meant to be, man.
Read the code again.. thanks.

the variable vehicles grows by one after used by factionvehicles[]
the same is this:
Код:
	new factionvehicles[400], vehicles = 0;
	while(mysql_retrieve_row())
	{
	    factionvehicles[vehicles] = mysql_fetch_int();
            vehicles++;
	}
Reply
#6

Come on, anybody?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)