Problem:array must be indexed
#1

So this is my problem:
pawn Код:
C:\Users\Justas\Desktop\TestServer\gamemodes\test3.pwn(271) : error 033: array must be indexed (variable "password")
And this is the line:
pawn Код:
password = strval(inputtext);
Help would be aprreciated
Reply
#2

Quote:

if(strval(password) >= 0 && strval(password) <= 299)

maybe.
Reply
#3

Quote:
Originally Posted by dusk
Посмотреть сообщение
So this is my problem:
pawn Код:
C:\Users\Justas\Desktop\TestServer\gamemodes\test3.pwn(271) : error 033: array must be indexed (variable "password")
And this is the line:
pawn Код:
password = strval(inputtext);
Help would be aprreciated
password is an array, and strval returns a single integer number.
What are you exactly trying to do in your code? Show us the part where you declare 'password' (that is, something looking like 'new password[X]')
Reply
#4

pawn Код:
new password[256];
I want to put inputtext into format
Reply
#5

format(password,sizeof(password),"%s",inputtext);

strval() will just get the numbers out of the string.
Reply
#6

Thanks i guess...i tried the same and i swear,it didn't work! +Rep tho
Reply
#7

the maximum len of the input is 128. so why is the array 256 characters big?
Reply
#8

Could anyone tell me: how do i extract a part from a .txt file and compare it with a string?
Reply
#9

@dusk - you could use the native file functions, but there are systems designed to make this an easy task...
Reply
#10

then, how do i extract a piece of information from the file? not all text but only a piece?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)