SA-MP Forums Archive
Little Problem. - 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: Little Problem. (/showthread.php?tid=478935)



Little Problem. - MaxPierce - 01.12.2013

I recieve the errors:
Quote:

\gamemodes\***.pwn(4357) : error 029: invalid expression, assumed zero
\gamemodes\***.pwn(4357) : error 029: invalid expression, assumed zero
\gamemodes\***.pwn(4357) : warning 215: expression has no effect
\gamemodes\***.pwn(4357) : error 001: expected token: ";", but found "]"
\gamemodes\l***.pwn(4357) : fatal error 107: too many error messages on one line

What I've got on that line is (IN BOLD):

for(new i = 1; i < MAX_NOTES; i++)
{
format(PlayerNotes[playerid][i][nNote],128,"None");
}


Re: Little Problem. - bensmart469 - 01.12.2013

Is nNote declared as a string?


Re: Little Problem. - MaxPierce - 01.12.2013

Quote:
Originally Posted by bensmart469
Посмотреть сообщение
Is nNote declared as a string?
No..

How do I do that?


Re: Little Problem. - Tayab - 01.12.2013

In the enum where you have nNote, do like this

enum WhatEver
{
nNote[128]
}

That will make nNote a string and then your code will work fine.


Re: Little Problem. - MaxPierce - 01.12.2013

Quote:
Originally Posted by Tayab
Посмотреть сообщение
In the enum where you have nNote, do like this

enum WhatEver
{
nNote[128]
}

That will make nNote a string and then your code will work fine.
Could you please be a little more descriptive?


Re: Little Problem. - Kyosaur - 02.12.2013

Quote:
Originally Posted by MaxPierce
Посмотреть сообщение
Could you please be a little more descriptive?
He is saying that "nNote", which is inside the enum that you use for your "PlayerNotes[MAX_PLAYERS][MAX_NOTES][ ... ];" array, needs to be a string (character array). You can post the enum that goes in the third dimension if you do not understand, or if that does not fix the issue.


Re: Little Problem. - ReApZ - 02.12.2013

look for a typo in line
4357
i.e
without seeing the code we cant help much but i think there might be a ] in the line where ; should be


Re: Little Problem. - OnY - 02.12.2013

Put this code at top of script...After 'new'

Код:
enum nNote
 {
 nNote[128]
 }



Re: Little Problem. - iZN - 02.12.2013

Might be this?

pawn Код:
new PlayerNotes[MAX_PLAYERS][ARRAY_SIZE][pInfo];
enum pInfo
{
   nNote[128]
};