little problem
#1

The error:
Код:
C:\Users\Mitchell\Desktop\server\gamemodes\SumoGM.pwn(895) : error 033: array must be indexed (variable "-unknown-")
The part where i made the variable:
pawn Код:
new boughtcar[MAX_SERVER_PLAYERS];
And the line where i got the error:
pawn Код:
if(boughtcar[playerid]=="dumper"){
Reply
#2

Use:
pawn Код:
new boughtcar[MAX_SERVER_PLAYERS][64]; // Make it String
Reply
#3

Now i still get the same error, but now like this:
Код:
C:\Users\Mitchell\Desktop\server\gamemodes\SumoGM.pwn(895) : error 033: array must be indexed (variable "boughtcar")
Reply
#4

its MAX_PLAYERS not MAX_SERVER_PLAYERS
Reply
#5

in my code, everywhere is used MAX_SERVER_PLAYERS, even when i use MAX_PLAYERS, i get the same error.
Reply
#6

Use strcmp instead of using ==, since you are trying to compare strings not integers or floats.

pawn Код:
if(!strcmp(boughtcar[playerid], "dumper"))
And also, change the array into this:

pawn Код:
new boughcar[MAX_PLAYERS][64];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)