Errors - 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: Errors (
/showthread.php?tid=540766)
Errors -
Dangjai - 07.10.2014
pawn Код:
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(13640) : error 017: undefined symbol "GetNumberOfPages"
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(14947) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(14947) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(14947 -- 14949) : warning 215: expression has no effect
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(14949) : error 001: expected token: ";", but found "if"
C:\Users\Dell\Desktop\Stunt Evolution v4\gamemodes\SEv4.pwn(14949) : fatal error 107: too many error messages on one line
Error line
pawn Код:
GetNumberOfPages( )
{
if((gTotalItems >= SELECTION_ITEMS) && (gTotalItems % SELECTION_ITEMS) == 0)
{
return (gTotalItems / SELECTION_ITEMS);
}
else return (gTotalItems / SELECTION_ITEMS) + 1;
}
Re: Errors -
YanLanger - 07.10.2014
GetNumberOfPages says it's undefined then define it.
Read the errors.
Re: Errors -
Dangjai - 07.10.2014
Full code please.
Re: Errors -
XGreen - 07.10.2014
PHP код:
new GetNumberOfPages[MAX_PLAYERS]; //try
GetNumberOfPages()
{
if((gTotalItems >= SELECTION_ITEMS && gTotalItems % SELECTION_ITEMS == 0) //main error
{
return (gTotalItems / SELECTION_ITEMS);
}
else return (gTotalItems / SELECTION_ITEMS) + 1;
}
Also, Explain Us what are u trying to do.
Re: Errors -
Dangjai - 07.10.2014
Quote:
Originally Posted by XGreen
PHP код:
new GetNumberOfPages[MAX_PLAYERS]; //try
GetNumberOfPages()
{
if((gTotalItems >= SELECTION_ITEMS && gTotalItems % SELECTION_ITEMS == 0) //main error
{
return (gTotalItems / SELECTION_ITEMS);
}
else return (gTotalItems / SELECTION_ITEMS) + 1;
}
Also, Explain Us what are u trying to do.
|
This my vehicle menu textdraws.
Re: Errors -
Dangjai - 07.10.2014
Quote:
Originally Posted by XGreen
PHP код:
new GetNumberOfPages[MAX_PLAYERS]; //try
GetNumberOfPages()
{
if((gTotalItems >= SELECTION_ITEMS && gTotalItems % SELECTION_ITEMS == 0) //main error
{
return (gTotalItems / SELECTION_ITEMS);
}
else return (gTotalItems / SELECTION_ITEMS) + 1;
}
Also, Explain Us what are u trying to do.
|
This didnt worked.
Re: Errors -
Pottus - 07.10.2014
That isn't the issue what everyone is saying you fucked up a switch() around line 14947 and GetNumberOfPages() function is after line 14949. This is why you use includes and code modular it makes things so much easier than sifting through tens of thousands of lines just to fix some basic errors.
That error happens when do you something like this.
pawn Код:
switch(a)
{
case 1: { return 1; }
return 1;
}
return 1;
Re: Errors -
XGreen - 07.10.2014
ur try to do a vehicle menu selection? remove ur current vehicle selection, then use this
https://sampforum.blast.hk/showthread.php?tid=407045
Re: Errors -
Dangjai - 07.10.2014
Quote:
Originally Posted by Pottus
That isn't the issue what everyone is saying you fucked up a switch() around line 14947 and GetNumberOfPages() function is after line 14949. This is why you use includes and code modular it makes things so much easier than sifting through tens of thousands of lines just to fix some basic errors.
That error happens when do you something like this.
pawn Код:
switch(a) { case 1: { return 1; } return 1; } return 1;
|
I dont have any line like this.
Re: Errors -
Dangjai - 07.10.2014
Quote:
Originally Posted by XGreen
|
Lolwat? 10k lines for orignal server vehicle menu .