Array must be indexed
#1

Hi, I just made this:

Код:
code removed, i don't want to release it :P
But when I compile it I get this error:
Код:
(25028) : error 033: array must be indexed (variable "inputtext")
I ******d, I tried changing inputtext to strval(inputtext), it compiled good but it doesn't work properly. When I try to search a vehicle plate then it just says "License Plate:" (blank). And even if the plate is valid it says "Vehicle was not found in the database." What do I need to do with the inputtext for it to work?
Reply
#2

Your code:
pawn Код:
if (CarData[carid][carPlate] == inputtext)
carPlate is a string I assume and so inputtext is, use strcmp to compare them.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Your code:
pawn Код:
if (CarData[carid][carPlate] == inputtext)
carPlate is a string I assume and so inputtext is, use strcmp to compare them.
Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)