SA-MP Forums Archive
Need some help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need some help (/showthread.php?tid=88149)



Need some help - Jochemd - 24.07.2009

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




Re: Need some help - boelie - 24.07.2009

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

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


Re: Need some help - Jochemd - 24.07.2009

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




Re: Need some help - GTA_Rules - 24.07.2009

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.


Re: Need some help - Jochemd - 24.07.2009

Quote:

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

Now that one repeats


Re: Need some help - GTA_Rules - 24.07.2009

Show me the entire script


Re: Need some help - Jochemd - 24.07.2009

Here you are, download it


Re: Need some help - MadeMan - 24.07.2009

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