Problem
#1

Код:
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(98) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(98) : warning 217: loose indentation
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(98) : error 001: expected token: "-identifier-", but found "="
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(98) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(98) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Script
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new baze;
new mainigais;
#define COLOR_Open 0xB345BAF5
#define COLOR_Close 0x66FDB8F5

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
mainigais = 0;
baze= CreateObject(11416, 977.590210, 2072.922363, 11.820015, 0.0000, 0.0000, 180.0000);
CreateObject(2632, 977.544006, 2070.883057, 14.741612, 90.2409, 359.1406, 90.8594);
CreateObject(2632, 977.532776, 2074.183838, 14.801730, 90.2409, 359.1406, 90.8594);
//CreateObject(11416, 977.559937, 2072.914063, 7.652934, 0.0000, 0.0000, 180.0000);
}

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(cmdtext, "/mcr", true) == 0)
  new state = GetPlayerState(playerid);
  if(IsPlayerInAnyVehicle(playerid))  {
  if(state != PLAYER_STATE_DRIVER) {
  SendClientMessage(playerid,0xFF3333AA,"Only Driver");
  return 1;
  }
  new vehicleid = GetPlayerVehicleID(playerid);
  LinkVehicleToInterior(vehicleid,0);
  SetVehiclePos(vehicleid, 987.9366,2117.4451,10.8203);
  SetVehicleZAngle(vehicleid,0);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  else  {
  SetPlayerInterior(playerid, 0);
  SetPlayerPos(playerid, 987.9366,2117.4451,10.8203);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  return 1;
}
if(strcmp("/baze", cmdtext, true, 6) == 0) {
  if(mainigais == 0) {
   SendClientMessage(playerid, 0xB345BAF5,"Baze ir atverta");
   MoveObject(baze, 977.559937, 2072.914063, 7.652934, 3); //vala
   mainigais = 1;
  } else if(mainigais == 1) {
   SendClientMessage(playerid, 0x66FDB8F5,"Baze ir aizverta");
   MoveObject(baze, 977.590210, 2072.922363, 11.820015, 3); //ciet
   mainigais = 0;
  }
  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;
}
Please help me fix this 4 errors

\/\/\/\/\/\/\/\/\/
Reply
#2

Could you specify line 98?
Reply
#3

You nēed 98 Line?

Код:
 new state = GetPlayerState(playerid);
Reply
#4

Quote:
Originally Posted by endjuru
You nēed 98 Line?

Код:
 new state = GetPlayerState(playerid);
you forgot a "{"...
it should be:
Код:
i
 if (strcmp(cmdtext, "/mcr", true) == 0){

  new state = GetPlayerState(playerid);
  if(IsPlayerInAnyVehicle(playerid))  {
  if(state != PLAYER_STATE_DRIVER) {
  SendClientMessage(playerid,0xFF3333AA,"Only Driver");
  return 1;
  }
  new vehicleid = GetPlayerVehicleID(playerid);
  LinkVehicleToInterior(vehicleid,0);
  SetVehiclePos(vehicleid, 987.9366,2117.4451,10.8203);
  SetVehicleZAngle(vehicleid,0);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  else  {
  SetPlayerInterior(playerid, 0);
  SetPlayerPos(playerid, 987.9366,2117.4451,10.8203);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  return 1;
}
Reply
#5

Add to help you:
You can delete the lines you donґt need in the script.
Reply
#6

Dude thanks but
Код:
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(99) : error 001: expected token: "-identifier-", but found "state"
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(101) : error 001: expected token: "-identifier-", but found "!="
C:\Documents and Settings\Mufasa\Рабочий стол\Bazite.pwn(130) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Script
97-131
Код:
if (strcmp(cmdtext, "/mcr", true) == 0){

  new state = GetPlayerState(playerid);
  if(IsPlayerInAnyVehicle(playerid))  {
  if(state != PLAYER_STATE_DRIVER) {
  SendClientMessage(playerid,0xFF3333AA,"Only Driver");
  return 1;
  }
  new vehicleid = GetPlayerVehicleID(playerid);
  LinkVehicleToInterior(vehicleid,0);
  SetVehiclePos(vehicleid, 987.9366,2117.4451,10.8203);
  SetVehicleZAngle(vehicleid,0);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  else  {
  SetPlayerInterior(playerid, 0);
  SetPlayerPos(playerid, 987.9366,2117.4451,10.8203);
  SendClientMessage(playerid,0xC06432C6,"Welcome to Kikiz Baze!");
  }
  return 1;
}
if(strcmp("/baze", cmdtext, true, 6) == 0) {
  if(mainigais == 0) {
   SendClientMessage(playerid, 0xB345BAF5,"Baze ir atverta");
   MoveObject(baze, 977.559937, 2072.914063, 7.652934, 3); //vala
   mainigais = 1;
  } else if(mainigais == 1) {
   SendClientMessage(playerid, 0x66FDB8F5,"Baze ir aizverta");
   MoveObject(baze, 977.590210, 2072.922363, 11.820015, 3); //ciet
   mainigais = 0;
  }
  return 1;
  }
	return 0;
}
Reply
#7

Word state seems to cause problems so replace state with pstate for example.
Reply
#8

Quote:
Originally Posted by MadeMan
Word state seems to cause problems so replace state with pstate for example.
Emm!
DUDE YOU ROX!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)