PAWN Compiler Jokes
#1

PHP код:
if (res == 0) return error_failed;
else
{
   
// some code here
   // and here
   /*
      some code here...
   */

Problem: gamemode working was unstabile (like c[-1] = 100). Then I removed comments in 'else' block and everything becomes good!!
Epic error! I spent 2 hours to find what was happened.

Comments affects result code! very strage...
PS: it is NOT SAMP error, it is PAWN compiler error..
Reply
#2

Yeah, i also had the pleasure to experience a compiler bug.
I have a lot of #include statements in my script (> 100) and
many files have the same names, but are in different directorys.
The pawn compiler somehow decided that files with the same name
were the same and don't need to be included multiple times in a row.

Let's take this piece of code for example:
Код:
530 public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
531     #include "include/cmds/navi/navi_OnDialogResponse.inc"
532     #include "include/teams/drivingschool/fs_OnDialogResponse.inc"
533     #include "include/atm/atm_OnDialogResponse.inc"
534     #include "include/teams/general/teams_OnDialogResponse.inc"
535     #include "include/houses/houses_OnDialogResponse.inc"
536     #include "include/help/help_OnDialogResponse.inc"
537     #include "include/functions/LoginRegister.inc"
538 
539     return 1;
540 }
Whithout the filename prefixes it did only include the navi thingy.
I don't know whether this bug still exists, because this happened
quite a while ago.
Reply
#3

very strange
Reply
#4

Could you please tell me where this is documented, ******?

Edit: Nevermind, I already found it in the Pawn Language Guide on page 119.
Thanks for your hint.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)