SA-MP Forums Archive
5 errors, need 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)
+--- Thread: 5 errors, need help! (/showthread.php?tid=347892)



5 errors, need help! - Rico . - 03.06.2012

C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12409) : error 017: undefined symbol "command"
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12411) : error 017: undefined symbol "Player"
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12411) : warning 215: expression has no effect
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12411) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12411) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn (12411) : fatal error 107: too many error messages on one line


12409 command(paytoll, playerid, params[])
12410 {
12411 if(Player[playerid][Authenticated] == 1);


Re: 5 errors, need help! - leonardo1434 - 03.06.2012

Well, the commands are wrong's, there's no doublt.

if you wish me to fix it, post your vars, and the whole commands.

please use [pawn] [./pawn] instead of just post it.


Re: 5 errors, need help! - Stefand - 03.06.2012

Quote:
Originally Posted by leonardo1434
Посмотреть сообщение
Well, the commands are wrong's, there's no doublt.

if you wish me to fix it, post your vars, and the whole commands.

please use [pawn] [./pawn] instead of just post it.
what he said:

Let us see the command/thing you made


Re: 5 errors, need help! - Rico . - 03.06.2012

pawn Код:
command(paytoll, playerid, params[])
{
    if(Player[playerid][Authenticated] == 1);
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 618.9771,336.9608,19.2733))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                SendClientMessage(playerid, GREY, "[Paytoll -$5] Welcome to Bone County. Enjoy your stay!");
                Player[playerid][Money] -= 5;
                MoveObject(paytoll1, 618.2999, 345.2999, 18.8999, 50.0, 0.0, 16.0000, 213.7507);
                SetTimer("paytoll1close", 5000, 0);
                //MoveObject(paytoll2, 606.5000, 337.3999, 18.7999, 10.0, 0.0, 15.7497, 33.4983);
            }
            else return SendClientMessage(playerid, GREY, "You must be in a Vehicle.");
        }
        else if(IsPlayerInRangeOfPoint(playerid, 3.0, 606.4752,345.4309,18.9297))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                SendClientMessage(playerid, GREY, "[Paytoll -$5] Welcome to Red County. Enjoy your stay!");
                Player[playerid][Money] -= 5;
                //MoveObject(paytoll1, 618.2999, 345.2999, 18.8999, 10.0, 0.0, 16.0000, 213.7507);
                MoveObject(paytoll2, 606.5000, 337.3999, 18.7999, 50.0, 0.0, 15.7497, 33.4983);
                SetTimer("paytoll2close", 5000, 0);
            }
            else return SendClientMessage(playerid, GREY, "You must be in a Vehicle.");
        }
        else return SendClientMessage(playerid, GREY, "You are not near the Paytoll.");
    }
    else return SendClientMessage(playerid, GREY, "You must be logged in.");
    return 1;
}

forward paytoll1close();
public paytoll1close()
{
    MoveObject(paytoll1, 618.2999, 345.2999, 18.8999, 50.0, 0.0, 90.0, 213.7506);
}

forward paytoll2close();
public paytoll2close()
{
    MoveObject(paytoll2, 606.5000, 337.3999, 18.7999, 50.0, 0.0, 89.7497, 33.4983);
}



Re: 5 errors, need help! - Sandiel - 03.06.2012

Quote:
Originally Posted by Rico .
Посмотреть сообщение
pawn Код:
if(Player[playerid][Authenticated] == 1);
Should be
pawn Код:
if(Player[playerid][Authenticated] == 1)
Also 'player' is not defined, so if you have an enum for this...
Make sure you do this on top of your script
pawn Код:
new Player[MAX_PLAYERS][enum];

NOTE: if you just copy/pasted this from another script, and dunno what Enums are....explanation found on wikipedia.


Re: 5 errors, need help! - Rico . - 03.06.2012

new errors

pawn Код:
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn(12410) : error 017: undefined symbol "command"
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn(12412) : error 001: expected token: ")", but found "["
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn(12412) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn(12412) : error 017: undefined symbol "Authenticated"
C:\Users\User\Desktop\samp\gamemodes\ServeriGM.pwn(12412) : fatal error 107: too many error messages on one line
12410 command(paytoll, playerid, params[])
12411 {
12412 if(Player[playerid][Authenticated] == 1)


Re: 5 errors, need help! - Rico . - 04.06.2012

Up! Still need help :/


Re: 5 errors, need help! - Firo - 04.06.2012

Are you using zcmd?