2 errors while compile
#1

C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(50) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(61) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(64) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(67) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(70) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(73) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(74) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(242) : error 021: symbol already defined: "OnDialogResponse"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.






//My First Gamemode
#include <a_samp>
#include <sscanf2>
#include <streamer>

//My System Colours
#define COLOR_ORANGE 0xFFA500FF
#define COLOR_LIMEGREEN 0x32CD32FF
#define COLOR_ROYALBLUE 0x4169E1FF
#define COLOR_SALMON 0xFA8072FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Select your class!", "Pilot \n Trucker", "Spawn", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 5)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, -1, "You have spawned as a pilot!");
SetSpawnInfo(playerid, 0, 61, 1326.6730, 1502.4309, 14.7109, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
if(listitem == 1)
{
SendClientMessage(playerid, -1, "You have spawned as a trucker!");
SetSpawnInfo(playerid, 0, 72, -2105.3228, -124.2982, 37.2531, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
return 1;
}
}
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}

public OnPlayerUpdate(playerid)
{
return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Reply
#2

Well, it's hard to help you without Code.

You can post the code, or send me your TeamViewer Data per PM and then i make it for you
Reply
#3

C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(50) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(61) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(64) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(67) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(70) : warning 217: loose indentation
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(73) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Dell\Desktop\server\gamemodes\aviationlif e.pwn(74) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Write it like this: http://pastebin.com/18J7J7vM

Greekz
Reply
#5

pawn Код:
//My First Gamemode
#include <a_samp>
#include <sscanf2>
#include <streamer>

//My System Colours
#define COLOR_ORANGE 0xFFA500FF
#define COLOR_LIMEGREEN 0x32CD32FF
#define COLOR_ROYALBLUE 0x4169E1FF
#define COLOR_SALMON 0xFA8072FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Select your class!", "Pilot \n Trucker", "Spawn", "Cancel");
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 5)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SendClientMessage(playerid, -1, "You have spawned as a pilot!");
                SetSpawnInfo(playerid, 0, 61, 1326.6730, 1502.4309, 14.7109, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            if(listitem == 1)
            {
                SendClientMessage(playerid, -1, "You have spawned as a trucker!");
                SetSpawnInfo(playerid, 0, 72, -2105.3228, -124.2982, 37.2531, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
        }
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#6

please help me
Reply
#7

1. Read about loose indentation here.
2. Put the return 1 just over the last bracket.
3. Show the code with that error, it's hard to find when reading your entire script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)