pInfo is not a string - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: pInfo is not a string (
/showthread.php?tid=331810)
pInfo is not a string -
BleverCastard - 06.04.2012
Код:
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;
}
Re: pInfo is not a string -
Cjgogo - 06.04.2012
Show me where you defined pInfo in your gamemode
Re: pInfo is not a string -
BleverCastard - 06.04.2012
Код:
enum pInfo
{
pPass,
pCash,
pScore,
pAdmin,
pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: pInfo is not a string -
Cjgogo - 06.04.2012
Try to replace the error line with this:
pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1)
Re: pInfo is not a string -
BleverCastard - 06.04.2012
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.
Re: pInfo is not a string -
Cjgogo - 06.04.2012
Do you realize the command gives money to you?And not to a specified ID?
Re: pInfo is not a string -
ViniBorn - 06.04.2012
pawn Код:
PlayerInfo[playerid][pCash] += 1000;
Re: pInfo is not a string -
BleverCastard - 06.04.2012
Yes, I was testing it out. Simply because the pInfo doesn't work.
Help?
Re: pInfo is not a string -
Cjgogo - 06.04.2012
viniBorn told you the solution...
Re: pInfo is not a string -
BleverCastard - 06.04.2012
I know, I was posting when he already posted.