pInfo is not a string
#1

Код:
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(123) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(123) : warning 215: expression has no effect
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(123) : error 001: expected token: ";", but found "]"
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(123) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(123) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
I get these on this command.

Код:
CMD:money(playerid, params[])
{
	if(pInfo[playerid][pAdmin] == 1)
	{
	    SetPlayerMoney[playerid][pCash] += 1000;
	    SendClientMessage(playerid, COLOR_WHITE, "You have been given $1,000!");
	}
	return 1;
}
Reply
#2

Show me where you defined pInfo in your gamemode
Reply
#3

Код:
enum pInfo
{
    pPass,
    pCash,
	pScore,
    pAdmin,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#4

Try to replace the error line with this:

pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1)
Reply
#5

I did try that before, and I got these:
Код:
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(125) : error 017: undefined symbol "SetPlayerMoney"
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(125) : warning 215: expression has no effect
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(125) : error 001: expected token: ";", but found "]"
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(125) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\Servers\AFRPWindows\gamemodes\Gamemode.pwn(125) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

Do you realize the command gives money to you?And not to a specified ID?
Reply
#7

pawn Код:
PlayerInfo[playerid][pCash] += 1000;
Reply
#8

Yes, I was testing it out. Simply because the pInfo doesn't work.
Help?
Reply
#9

viniBorn told you the solution...
Reply
#10

I know, I was posting when he already posted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)