08.08.2011, 20:46
i just started mapmaking yesterday and i decided to spend some of my time making a simple gamemode just for the sake of it, but when i try compile it in Pawno it gives me a shitload of errors and doesnt reconignize the most common functions >.<
my whole code(pretty unstarted, was trying to test spawns)
Errors
What am i doing wrong?
my whole code(pretty unstarted, was trying to test spawns)
Код:
#define TEAM_LV 1
#define TEAM_LS 2
#define TEAM_LS_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_LV_COLOR 0xFF0000AA // Bright Red
// THIS IS THE ORIGINAL INCASE I SCREW UP #define TEAM_LV_COLOR 0xFF00FFAA // Bright Purple
main()
{
// print("\n----------------------------------");
// print("Welcome to Airport TDM by Henry_Jiggy");
// print("----------------------------------\n");
}
public OnGameModeInit()
{
//REMOVE THIS COMMENT IF IT WORKS AddPlayerClass(1, 417.5400, 2495.6201, 15.7000, 0.0, Weapon 350, Ammo 50, Weapon 356, Ammo 500, Weapon 371, Ammo 1);
//This up here ^^ added a Sawn off, a M4 and a Parachute, for the LV team class.(In order)
AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 50);
//ABOVE IS A TEST WHICH WAS ON THE TUTORIAL
//VEHICLE SPAWN TIME :D
AddStaticVehicle(487, Float:417.6300, Float:2515.0300, Float:15.7000, Float:0, 1, 1);
//This up here added LV Maverick Spawn 1 at Helipad Location 1
AddStaticVehicle(476, Float:425.4688, Float:2531.0000, Float:22.5547, Float:0, 1, 1);
//This up here added LV Rustler Spawn 1 at one of the Open Hangars
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)
{
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 OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Код:
C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(14) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit") C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(20) : error 017: undefined symbol "AddPlayerClass" C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(25) : error 017: undefined symbol "AddStaticVehicle" C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : error 017: undefined symbol "AddStaticVehicle" C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : error 029: invalid expression, assumed zero C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : warning 215: expression has no effect C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : warning 215: expression has no effect C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : warning 215: expression has no effect C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : warning 215: expression has no effect C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : error 001: expected token: ";", but found ")" C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(27) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.


