23.04.2012, 00:52
Quote:
pawn Код:
|
Код:
C:\Documents and Settings\Administrator\Desktop\job.pwn(19) : error 017: undefined symbol "P_Data" C:\Documents and Settings\Administrator\Desktop\job.pwn(19) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\job.pwn(19) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Administrator\Desktop\job.pwn(19) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\job.pwn(19) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
i made some changes to the script, added some defines ect now i get these errors
Код:
C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : error 001: expected token: ";", but found "-string-" C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Administrator\Desktop\job.pwn(26) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <YSI/y_ini>
#include <YSI\y_commands>
#include <streamer>
#define FILTERSCRIPT
#define COLOR_RED 0xFF0000AA
#define COLOR_WHITE 0xFFFFFFAA
enum info
{
pJob,
}
new P_Data[MAX_PLAYERS][info];
public OnFilterScriptInit()
{
return 1;
}
YCMD:healplayer(playerid,params[],help)
{
#pragma unused help
if(P_Data[playerid][pJob] != 2) return SCM(playerid,COLOR_RED,"ERROR:"COLOR_WHITE"You are not ");
new pplayerid,price,Float:Position[3];
if(sscanf(params,"ui",pplayerid,price)) return SCM(playerid,COLOR_RED,""COLOR_WHITE"Usage: /healplayer [Player ID/Part OfName] [Price]");
if(!PlayerWork[playerid]) return SCM(playerid,COLOR_RED,"ERROR: "COLOR_WHITE"Type /startjob");
if(PlayerVeh[playerid] != GetPlayerVehicleID(playerid)) return SCM(playerid,COLOR_RED,"EROR: "COLOR_WHITE"You are not in your vehicle");
if(pplayerid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_RED,"ERROR:"COLOR_WHITE"Invalid ID");
GetPlayerPos(pplayerid,Position[0],Position[1],Position[2]);
if(!IsPlayerInRangeOfPoint(playerid,5.0,Position[0],Position[1],Position[2])) return SCM(playerid,COLOR_RED,"ERROR:"COL_WHITE"You are not near to that player");
Seller[pplayerid] = playerid;
Price[pplayerid] = price;
SendFormatMSG(pplayerid,-1,"Player with job Los Santos EMS has you offered to heal you for price: %d type /accept",price);
SCM(playerid,-1,"Wait for player answer");
return 1;
}
//==============In command /accept
if(strcmp(text,"healplayer",false) == 0)
{
if(Seller[playerid] == 999) return SCM(playerid,COLOR_RED,"No body hasn't gave you an offer");
if(Price[playerid] > GetPlayerMoney(playerid)) return SCM(playerid,COLOR_RED,"You don't have that much money"),Seller[playerid] = 999;
SCM(Seller[playerid],-1,"Player has accepted the offer");
SCM(playerid,-1,"You have accepted the offer");
GivePlayerMoney(Seller[playerid],Price[playerid]);
GivePlayerMoney(playerid,-Price[playerid]);
new Float:health; GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health+100);
}