Need some help
#1

Hello,

I'm a beginner and I need some help. When I try to compile the script, it says that it have some errors. This is a piece of the script.

public OnPlayerCommandText(playerid, cmdtext[])

{ if(strcmp("/lvairport, true) == 0)

SetPlayerPos(playerid,1922.5964, -1399.8970, 13.5703);

return 1;
}


Does someone know what's wrong with it? Please post this piece of script in good form.


Greet, Jochemd


Btw, this are the errors


Quote:

C:\Users\Jochem\Desktop\SA-MP Server\gamemodes\Jochemdmode.pwn(105) : error 037: invalid string (possibly non-terminated string)
C:\Users\Jochem\Desktop\SA-MP Server\gamemodes\Jochemdmode.pwn(109) : warning 217: loose indentation

Reply
#2

i think its the { before the ' if '
you need it after like;

Код:
if(strcmp("/lvairport, true) == 0)
{
now it should work
Reply
#3

Now it gives these errors

Quote:

C:\Users\Jochem\Desktop\SA-MP Server\gamemodes\Jochemdmode.pwn(105) : error 037: invalid string (possibly non-terminated string)
C:\Users\Jochem\Desktop\SA-MP Server\gamemodes\Jochemdmode.pwn(113) : warning 209: function "OnPlayerCommandText" should return a value

Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/lvairport, true) == 0)
{
SetPlayerPos(playerid,1922.5964, -1399.8970, 13.5703);
return 1;
}
return 0;
}
Don't mind the intendation.
Reply
#5

Quote:

C:\Users\Jochem\Desktop\SA-MP Server\gamemodes\Jochemdmode.pwn(105) : error 037: invalid string (possibly non-terminated string)

Now that one repeats
Reply
#6

Show me the entire script
Reply
#7

Here you are, download it
Reply
#8

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/lvairport", true) == 0)
    {
        SetPlayerPos(playerid,1922.5964, -1399.8970, 13.5703);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)