26.02.2009, 18:07
I want the that any player can see the checkpoint, using playerid in the init . why it dosen't compile ?
Код:
C:\Documents and Settings\User\Desktop\SA-MP\Servidor v1.2\Blank.pwn(17) : error 017: undefined symbol "playerid" C:\Documents and Settings\User\Desktop\SA-MP\Servidor v1.2\Blank.pwn(32) : warning 202: number of arguments does not match definition C:\Documents and Settings\User\Desktop\SA-MP\Servidor v1.2\Blank.pwn(35) : warning 202: number of arguments does not match definition C:\Documents and Settings\User\Desktop\SA-MP\Servidor v1.2\Blank.pwn(17) : warning 204: symbol is assigned a value that is never used: "CP" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
#include <a_samp> #define COLOR_RED 0xFF0000AA new Menu:ElevatorMenu; new CP; public OnFilterScriptInit() { ElevatorMenu = CreateMenu("ElevatorMenu", 1, 50.0, 180.0, 200.0, 200.0); AddMenuItem(ElevatorMenu, 0, "Elevator up"); AddMenuItem(ElevatorMenu, 0, "Call Elevator"); AddMenuItem(ElevatorMenu, 0, "Cancel"); CP = SetPlayerCheckpoint(playerid, 1840.252563, -1662.095337, 58.791744, 3.00); return 1; } public OnPlayerSelectedMenuRow(playerid,row) { new Menu:current; current = GetPlayerMenu(playerid); if(current == ElevatorMenu) { switch(row) { case 0:{ MoveObject(980,1840.252563,-1662.095337,112.666771); } case 1:{ MoveObject(980,1840.252563,-1662.095337,58.791744); } case 2:{ SendClientMessage(playerid, COLOR_RED, "Menu canceled."); } } } return 1; }