MySQL Queries (Vehicle System).
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I don't really understand what you want to do and what the code you've posted is supposed to do. Some parts are half, I'll show you:

You format a query with INSERT INTO clause but you never execute a query. So what's the point of doing it if you don't want to insert a new row?

What's the point of the loop, the convertion of integer to string when you can use %i or %d specifier and the maxHit?

Last one, the callback. Your arguments are 2 in the callback: vehicleid, playerid but you only pass 1 argument in the callback in mysql_tquery.
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)
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: 1 Guest(s)