MySQL Queries (Vehicle System).
#5

Quote:
Originally Posted by Ryan_Undering
Посмотреть сообщение
Okay, the reason for no query execution is for debugging reasons -- I know that the execution of the query works, but not the ID.

The loop is checking each row of the `vehicles` table for an invalid model (empty row) where it might insert a new vehicle rather than constantly auto incrementing (this way if the /dveh command is executed, it can delete the noted row -- without it however when using DestroyVehicle(id) -- it uses a server id, not the table id.).. IN THEORY.

The second argument on the callback was a test (playerid) to relay a message back to the sender... It's not needed.


The hitMax was the only way I could think of to say to break the loop since it's using an if statement OUTSIDE of the loop (custom function)
Well, you should've mentioned everything in your thread. Even if I read the above quote, I still don't get few things.

What ID?

The loop goes from 1 to the size of vInfo array and it only checks if maxHit is 1. How is that supposed to check for an empty row?

If it's not needed, then pass INVALID_PLAYER_ID but keep the correct arguments.

I believe you've confused about hitMax. Is it supposed to be an array and check for it? In the loop above, if hitMax is 1, the loop will break from the start.
Reply


Messages In This Thread
MySQL Queries (Vehicle System). - by Ryan_Undering - 21.02.2014, 12:25
Re: MySQL Queries (Vehicle System). - by Ryan_Undering - 21.02.2014, 15:36
Re: MySQL Queries (Vehicle System). - by Konstantinos - 21.02.2014, 15:53
Re: MySQL Queries (Vehicle System). - by Ryan_Undering - 21.02.2014, 16:16
Re: MySQL Queries (Vehicle System). - by Konstantinos - 21.02.2014, 16:32
Re: MySQL Queries (Vehicle System). - by Ryan_Undering - 21.02.2014, 16:48

Forum Jump:


Users browsing this thread: 2 Guest(s)