error 032: array index out of bounds (variable "reason")
#1

pawn Code:
UserStats[id][BReason] = reason[128];
error 032: array index out of bounds (variable "reason")

Any ideas?

Jack_Rocker
Reply
#2

Remove the [128] and use strlen. Also make sure that BReason is 128.
pawn Code:
UserStats[id][BReason] = strlen(reason);
Reply
#3

now its showing up this error; error 006: must be assigned to an array
Reply
#4

Try using format.

pawn Code:
new reason[128];
format(reason, sizeof(reason), "Test");
format(UserStats[id][BReason], 128, reason);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)