Not working
#1

Hi, I need help with the "View Vehicle" in MDC 3rd time already today. The problem now is that if I run a random license plate that doesn't exists then it still runs the query and says that vehicle was not found in the database. It's not even supposed to run the query, I haven't made it work like that. Also if I even run a valid license plate, it says that vehicle was not found in the database. I don't understand what am I doing wrong:
Code:

Код:
removed, I don't want to release it :P
Reply
#2

Код:
format(query, sizeof(query), "SELECT `Character` FROM `characters` WHERE `ID` = '%d'", CarData[i][carOwner]);
carOwner is a string I suppose? If so, you need to use %e specifier in the query format.
Reply
#3

Nope, carOwner is an integer. Each player has got a SQL ID.
I fixed the problem by checking if the vehicle is owned before running the query.
Also I added a "count" variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)