2 errors with compiling
#1

Hello,

I need some help with this script: http://pastebin.com/h3cuaQJf

I get these errors:

Quote:

C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(221) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(231) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(242) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(257) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(271) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(273) : error 010: invalid function or declaration
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(274) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

And I really don't know how to fix these.
Can someone give me some clues? Thx in advance

wizarddoctor.
Reply
#2

Too much returns, remove one of them.
Reply
#3

pawn Код:
return 0;
return 0;
... Remove one.
Reply
#4

Thx, now there is only one error left:

Quote:

C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(221) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(231) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(242) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(257) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(271) : warning 217: loose indentation
C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(273) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#5

Indent your code and these errors will disappear.
Reply
#6

Indent is like this?

Код:
text {
        text  
        }
?
Reply
#7

This is an indented code:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/help"true))
    {
        
SendClientMessage(playerid0xFFFFFFFF"SERVER: This is the /help command!");
        return 
1;
    }
    return 
0;

And this not:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
if(!
strcmp(cmdtext"/help"true))
    {
SendClientMessage(playerid0xFFFFFFFF"SERVER: This is the /help command!");
        return 
1;
}
    return 
0;
    } 
Reply
#8

Ok, thank you.
Reply
#9

Quote:

C:\Users\Michel\Desktop\SA-MP server\gamemodes\script.pwn(273) : error 010: invalid function or declaration

Remove the remaining return.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)