Error help (rep+)
#1

I get this error:
PHP код:
C:\Users\\Desktop\games\samp scripts\Roleplay (0.3.7)\gamemodes\roleplay.pwn(1216) : error 033: array must be indexed (variable "name"
For this line:
PHP код:
if(HouseInfo[id][hOwner] == name
This is the hOwner enum:
PHP код:
    hOwner[MAX_PLAYER_NAME], 
And finally this is the getplayername stuff:
PHP код:
            GetPlayerName(playeridnamesizeof(name)); 
Help please.
Reply
#2

PHP код:
if(strcmp(HouseInfo[id][hOwner],name,true) != 0
Reply
#3

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
if(strcmp(HouseInfo[id][hOwner],name,true) != 0
+1 for the reply, but let me explain for others why thhat didn't work.

Strings can't be easily compared in PAWN, you can only compare them char-by-char or use strcmp() / other function, which does the same thing.

(Give +rep to AbyssMorgan, not me. I'm just spamming for clearness)
Reply
#4

thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)