Fix error
#1

Hello again with my errors :P,
Now i get that error on that line:
Код:
C:\Users\User\Desktop\GTA\Drift\Drift\gamemodes\Drift.pwn(2944) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Here is the line 2944...
pawn Код:
//line 2944--->
if(HouseInfo[h][hName] == "Name") return SendClientMessage(playerid, COLOR_WHITE, ".:: [ERROR]: No one has bought this house so you cannot rent from here.");
Reply
#2

Help please because i cant find why its happens that..
Reply
#3

did you not mean something like this?

pawn Код:
if(HouseInfo[h][hName] == Name)
Reply
#4

no its a text there... need to have "----"...Because its like "State House"
Reply
#5

Quote:
Originally Posted by gecatahh
no its a text there... need to have "----"...Because its like "State House"
show holy cmd
Reply
#6

pawn Код:
dcmd_renthouse(playerid,params[]) { // This needs to be intergrated with your players .ini account
    #pragma unused params
    if(IsPlayerConnected(playerid)){
        for(new h = 0; h <= MAX_HOUSES; h++){
          if(PlayerToPoint(PTP_RADIUS, playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])){
              if(HouseInfo[h][hName] == "Name") return SendClientMessage(playerid, COLOR_WHITE, ".:: [ERROR]: No one has bought this house so you cannot rent from here.");
            if(PlayerInfo[playerid][pHouse] != -1) return SendClientMessage(playerid, COLOR_WHITE, ".:: [ERROR]: You are allready renting a house. Use /unrenthouse to stop renting there.");
              PlayerInfo[playerid][pHouse] = h;
              SendFormattedMessage(playerid, COLOR_WHITE, ".:: [HOUSE]: You are now renting from %s.", HouseInfo[h][hName]);
            } } }
    return true;
}
Reply
#7

Use strcmp for comparing strings
https://sampwiki.blast.hk/wiki/Strcmp
Reply
#8

Thanks i will try now.Now not have error but need to see it works. Thanks.d
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)