Pawno Errors??
#1

FIXED
Reply
#2

put this at top of your script:
pawn Код:
#pragma tabsize 0
Reply
#3

@Red_Dragon: Still have the same errors.

Is there anyone to fix this issue? :/
Reply
#4

Try this one:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/engine", cmdtext, true, 10) == 0)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerVehicleSeat(playerid) == 0)
                {
                    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
                    if(engine == 1)
                    {
                        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
                        SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
                        GameTextForPlayer(playerid,"Vehicle Engine Stopped!",2000,6);
                        return 1;
                    }
                    else
                    SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
                    GameTextForPlayer(playerid,"Vehicle Engine Started!",2000,6);
                }
                else SendClientMessage(playerid,-1,"Error: You are not at the driving seat!");
                return 1;
            }
            else
            SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");
    }
    if (strcmp("/lock", cmdtext, true, 10) == 0)
    {
        new engine, lights, alarm, doors, bonnet, boot, objective;
        new vehicleid = GetPlayerVehicleID(playerid);
        if(IsPlayerInAnyVehicle(playerid))
            {
                GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
                if(doors == 1)
                {
                    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vehicleid,engine,lights,alarm,false,bonnet,boot,objective);
            GameTextForPlayer(playerid,"Vehicle Unlocked!",2000,6);
            return 1;
                }
                else
                SetVehicleParamsEx(vehicleid,engine,lights,alarm,true,bonnet,boot,objective);
                GameTextForPlayer(playerid,"Vehicle Locked!",2000,6);
            }
            else
            SendClientMessage(playerid,ROOD,"Error: You are not in a vehicle!");
            return 0;
    }
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,-1,"{000000}**{210000}*{450000}*{610000}*{700000}*{8A0000}*{A60000}*{B80000}*{CC0000}*{DB0000}*{FF0000}*{FF2929}*{FF4D4D}*{FF6161}*{FF7A7A}*{FF9191}*{FFABAB}*"};
    SendClientMessage(playerid,0xFFFFFF,"Hello, welcome to the help section!");
    SendClientMessage(playerid,0xFFFFFF,"There are 2 teams. Yellow and Red. Try killing your enemy by teaming up with"};
    SendClientMessage(playerid,0xFFFFFF,"other friendly users. Please read /rules! Use /newb for questions.");
    SendClientMessage(playerid,0xFFFFFF,"Use /report if you saw a Hacker / Rulebreaker.");
    SendClientMessage(playerid,-1,"{000000}**{210000}*{450000}*{610000}*{700000}*{8A0000}*{A60000}*{B80000}*{CC0000}*{DB0000}*{FF0000}*{FF2929}*{FF4D4D}*{FF6161}*{FF7A7A}*{FF9191}*{FFABAB}*"};
    return 1;
    }
}
It might work try and tell me
Reply
#5

@Red_Dragon:

Код:
C:\Documents and Settings\****\****\****\pawno\include\YSI\internal\y_dohooks.inc(2572) : warning 235: public function lacks forward declaration (symbol "OnUnoccupiedVehicleUpdate")
C:\Documents and Settings\****\****\****\pawno\include\YSI\internal\y_dohooks.inc(3432) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
C:\Documents and Settings\****\****\****\pawno\include\YSI\internal\y_dohooks.inc(3501) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(184) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(189) : error 001: expected token: ",", but found "}"
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(189) : error 036: empty statement
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(191) : error 001: expected token: ",", but found "}"
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(191) : error 010: invalid function or declaration
C:\Documents and Settings\****\****\****\gamemodes\Dayz3.pwn(195) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#6

Forward it, ex:

PHP код:
warning 235: public function lacks forward declaration (symbol "OnUnoccupiedVehicleUpdate"
PHP код:
forward OnUnoccupiedVehicleUpdate(vehicleidplayeridpassenger_seat); 
Do that for the rest, remember the the parameters have to be the same as you have it in your public.
Reply
#7

LOL, Thanks for helping everyone, found it already.

There were some stupid mistakes in the script, such as "{" instead of "(".

Greetz, CrazyManiac.
Reply
#8

Why ??!?! it removes the loose intendation error !
Reply
#9

****** knows better than us And why not just fix the error without being lazy? If you are lazy then why bother learn scripting?
Reply
#10

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Why ??!?! it removes the loose intendation error !
Because without indentation your code is virtually unreadable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)