SA-MP Forums Archive
How to fix this error in gamemode - 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: How to fix this error in gamemode (/showthread.php?tid=470492)



How to fix this error in gamemode - FiReMaNStone - 18.10.2013

pawn Код:
//------------------------------------NewsLine----------------------------------
new news[][] =
{
    "[]Server Owners [RB]ReD_DeViL ",
    "[ ] Stay Online With Our Server [ ]",
    "[ ] Play As Much You Want [ ]",
    "[ ] Mapper Is [RB]ReD_DeViL [ ]",
};
public Nupdate ()
{
static Number = 0;
TextDrawSetString(Ntick, news[Number++]);
TextDrawShowForAll(Ntick);
if(Number == sizeof(news)) Number = 0;
return 1;
}
i made it like this then it happen

C:\Documents and Settings\Administrator\My Documents\NRGaming V.4\gamemodes\NRG[V.4.0].pwn(37225) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\NRGaming V.4\gamemodes\NRG[V.4.0].pwn(37225) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

please say fast


Re: How to fix this error in gamemode - qazwsx - 18.10.2013

Quote:
Originally Posted by FiReMaNStone
Посмотреть сообщение
C:\Documents and Settings\Administrator\My Documents\NRGaming V.4\gamemodes\NRG[V.4.0].pwn(37225) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\NRGaming V.4\gamemodes\NRG[V.4.0].pwn(37225) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

please say fast
can you give the codes?


Re: How to fix this error in gamemode - FiReMaNStone - 18.10.2013

pawn Код:
//------------------------------------NewsLine----------------------------------
new news[][] =
{
    "[]Server Owners [RB]ReD_DeViL ",
    "[ ] Stay Online With Our Server [ ]",
    "[ ] Play As Much You Want [ ]",
    "[ ] Mapper Is [RB]ReD_DeViL [ ]",
};
public Nupdate ()
{
static Number = 0;
TextDrawSetString(Ntick, news[Number++]);
TextDrawShowForAll(Ntick);
if(Number == sizeof(news)) Number = 0;
return 1;
}



Re: How to fix this error in gamemode - newbie scripter - 18.10.2013

i think u should remove a "," in

pawn Код:
"[ ] Mapper Is [RB]ReD_DeViL [ ]",
because its the last one


Re: How to fix this error in gamemode - AnonScripter - 18.10.2013

you can't add a comma "," in the last message
pawn Код:
"[ ] Mapper Is [RB]ReD_DeViL [ ]",



Re: How to fix this error in gamemode - FiReMaNStone - 18.10.2013

Thank You For you help and you fixed it for me