07.03.2009, 15:50
I make elevator from [FS] script
But , found 26 Errors. Help me please
This script
-----------------------------------------------------------------------------------------
#include <a_samp>
new Menu:Select;
new Menu:elevator;
new var0[25];
new var1[256];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Teleport elevator ");
print("--------------------------------------\n");
Select = CreateMenu("Select", 1,20,120,150,40);
AddMenuItem(Select, 0, "elevator");
elevator = CreateMenu("Select", 1,20,120,150,40);
AddMenuItem(elevator, 0, "Level 1");
AddMenuItem(elevator, 0, "Level 2");
AddMenuItem(elevator, 0, "Level 3");
AddMenuItem(elevator, 0, "Level 4");
AddMenuItem(elevator, 0, "Level 5");
AddMenuItem(elevator, 0, "Level 6");
AddMenuItem(elevator, 0, "Level 7");
AddMenuItem(elevator, 0, "Level 8");
AddMenuItem(elevator, 0, "Level 9");
AddMenuItem(elevator, 0, "Level 10");
AddMenuItem(elevator, 0, "~r~Menu");
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/elevator", cmdtext, true, 10) == 0)
{
ShowMenuForPlayer(Select,playerid);
TogglePlayerControllable(playerid,false);
return 1;
}
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Select)
{
switch(row)
{
case 1:
{
ShowMenuForPlayer(elevator, playerid);
}
}
}
if(CurrentMenu == elevator)
{
switch(row)
{
case 0:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, -274.9351,1535.3416,75.3594);
SetVehiclePos(araba, -274.9351,1535.3416,75.3594);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 1:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, 2273.3972,1395.4358,42.8203);
SetVehiclePos(araba, 2273.3972,1395.4358,42.8203);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 2:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, 1210.4374,-2037.3204,69.007;
SetVehiclePos(araba, 1210.4374,-2037.3204,69.007;
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 3:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, -2399.6096,-613.3132,132.3755);
SetVehiclePos(araba, -2399.6096,-613.3132,132.3755);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 4: //main menu
{
ShowMenuForPlayer(Select, playerid);
}
}
return 1;
}
-----------------------------------------------------------------------------------------------------
This 26 Errors.
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : warning 217: loose indentation
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : error 004: function "OnPlayerCommandText" is not implemented
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(33) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(35) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(36) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : warning 225: unreachable code
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : error 004: function "OnPlayerSelectedMenuRow" is not implemented
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(43) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(46) : error 017: undefined symbol "row"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(50) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(56) : error 017: undefined symbol "row"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(61) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(62) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(64) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(65) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(70) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(71) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(73) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(74) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(79) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(80) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(82) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(83) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(8 : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(89) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(91) : error 017: undefined symbol "playerid"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
--------------------------------------------------------------------------------------------------
Thankyou for help
But , found 26 Errors. Help me please
This script
-----------------------------------------------------------------------------------------
#include <a_samp>
new Menu:Select;
new Menu:elevator;
new var0[25];
new var1[256];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Teleport elevator ");
print("--------------------------------------\n");
Select = CreateMenu("Select", 1,20,120,150,40);
AddMenuItem(Select, 0, "elevator");
elevator = CreateMenu("Select", 1,20,120,150,40);
AddMenuItem(elevator, 0, "Level 1");
AddMenuItem(elevator, 0, "Level 2");
AddMenuItem(elevator, 0, "Level 3");
AddMenuItem(elevator, 0, "Level 4");
AddMenuItem(elevator, 0, "Level 5");
AddMenuItem(elevator, 0, "Level 6");
AddMenuItem(elevator, 0, "Level 7");
AddMenuItem(elevator, 0, "Level 8");
AddMenuItem(elevator, 0, "Level 9");
AddMenuItem(elevator, 0, "Level 10");
AddMenuItem(elevator, 0, "~r~Menu");
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/elevator", cmdtext, true, 10) == 0)
{
ShowMenuForPlayer(Select,playerid);
TogglePlayerControllable(playerid,false);
return 1;
}
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Select)
{
switch(row)
{
case 1:
{
ShowMenuForPlayer(elevator, playerid);
}
}
}
if(CurrentMenu == elevator)
{
switch(row)
{
case 0:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, -274.9351,1535.3416,75.3594);
SetVehiclePos(araba, -274.9351,1535.3416,75.3594);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 1:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, 2273.3972,1395.4358,42.8203);
SetVehiclePos(araba, 2273.3972,1395.4358,42.8203);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 2:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, 1210.4374,-2037.3204,69.007;
SetVehiclePos(araba, 1210.4374,-2037.3204,69.007;
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 3:
{
new araba;
araba=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, -2399.6096,-613.3132,132.3755);
SetVehiclePos(araba, -2399.6096,-613.3132,132.3755);
PutPlayerInVehicle(playerid,araba,0);
TogglePlayerControllable(playerid,1);
}
case 4: //main menu
{
ShowMenuForPlayer(Select, playerid);
}
}
return 1;
}
-----------------------------------------------------------------------------------------------------
This 26 Errors.
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : warning 217: loose indentation
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(31) : error 004: function "OnPlayerCommandText" is not implemented
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(33) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(35) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(36) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : warning 225: unreachable code
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : error 029: invalid expression, assumed zero
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(41) : error 004: function "OnPlayerSelectedMenuRow" is not implemented
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(43) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(46) : error 017: undefined symbol "row"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(50) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(56) : error 017: undefined symbol "row"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(61) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(62) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(64) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(65) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(70) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(71) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(73) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(74) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(79) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(80) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(82) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(83) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(8 : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(89) : error 017: undefined symbol "playerid"
C:\Documents and Settings\TheSix\My Documents\Downloads\Compressed\tele.pwn(91) : error 017: undefined symbol "playerid"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
--------------------------------------------------------------------------------------------------
Thankyou for help