Expecting "]" found ";" Doesn't Make Sense - 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: Expecting "]" found ";" Doesn't Make Sense (
/showthread.php?tid=510870)
[SOLVED] Expecting "]" found ";" Doesn't Make Sense -
Nathan_Taylor - 02.05.2014
pawn Code:
enum hVars
{
Float: hX,
Float: hY,
Float: hZ,
hPrice,
hOwner[128],
hName[128]
}
pawn Code:
new hInfo[MAX_HOUSES][hVars];
^ Line 516
Code:
C:\Users\Nate\Dropbox\SAMP 2\gamemodes\nateRP.pwn(516) : error 001: expected token: "]", but found ";"
Why am I getting this error? The line right above 516 is
pawn Code:
new pInfo[MAX_PLAYERS][cVars];
and that doesn't give me any errors.
Re: Expecting "]" found ";" Doesn't Make Sense -
Dignity - 02.05.2014
pawn Code:
enum hVars
{
Float: hX,
Float: hY,
Float: hZ,
hPrice,
hOwner[128],
hName[128]
};
Not sure but ^ might fix it
AW: Expecting "]" found ";" Doesn't Make Sense -
rospar - 02.05.2014
you should look a line above..
and reduce the array size the max player name is 24.
Re: Expecting "]" found ";" Doesn't Make Sense -
Aerotactics - 02.05.2014
Quote:
Originally Posted by Mionee
pawn Code:
enum hVars { Float: hX, Float: hY, Float: hZ, hPrice, hOwner[128], hName[128] };
Not sure but ^ might fix it
|
Yes, that is the fix. You must have a semicolon at the end of an enum.
Re: Expecting "]" found ";" Doesn't Make Sense -
Nathan_Taylor - 02.05.2014
Quote:
Originally Posted by Aerotactics
Yes, that is the fix. You must have a semicolon at the end of an enum.
|
Quote:
Originally Posted by Mionee
pawn Code:
enum hVars { Float: hX, Float: hY, Float: hZ, hPrice, hOwner[128], hName[128] };
Not sure but ^ might fix it
|
Same error is occuring, I don't have a semi-colon at the end of any other of my enums and it has always worked fine.
Re: Expecting "]" found ";" Doesn't Make Sense -
Nathan_Taylor - 02.05.2014
SOLVED!, I did
and there isn't supposed to be a ; at the end of that line, so it was putting in
which would really give out that error