Jack Posted January 13, 2012 Report Share Posted January 13, 2012 Salutare am facut comanda aceasta [pawn]if (strcmp(cmdtext, "/nrg", true)==0){ new string[256]; if(pNRG[playerid] > 0) { if(GetPlayerVehicleID(playerid) != pNRG[playerid]) { if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid); new Float: X, Float: Y, Float: Z, Float: Ang; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, Ang); SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid)); PutPlayerInVehicle(playerid, pNRG[playerid], 0); SetVehiclePos(pNRG[playerid], X, Y, Z); SetVehicleZAngle(pNRG[playerid], Ang); SetVehicleHealth(pNRG[playerid], 1000.0); LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid)); TextDrawShowForPlayer(playerid, MsgNrg); SetTimerEx("Hide", 3500, false, "d", playerid ,string); } else { SendClientMessage(playerid,0xCC0000AA, "{00C0FF}You are already sitting on your personal {F81414}NRG-500!"); } } else { if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid); new Float: X, Float: Y, Float: Z, Float: Ang; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, Ang); pNRG[playerid] = CreateVehicle(522, X, Y, Z+3, Ang, 75,3, 5000000); PutPlayerInVehicle(playerid, pNRG[playerid], 0); SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid)); printf("Personal NRG Created For %s.", PlayerName2(playerid)); TextDrawShowForPlayer(playerid, MsgNrg); SetTimerEx("Hide", 3500, false, "d", playerid ,string); for(new i=0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i) && i != playerid) { SetVehicleParamsForPlayer(pNRG[playerid], i, 0, 1); } } } return 1; }[/pawn]si imi da urmatoarele erori[pawn]E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(254) : warning 202: number of arguments does not match definitionE:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(320) : warning 213: tag mismatchE:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 017: undefined symbol "pNRG"E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : warning 215: expression has no effectE:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 001: expected token: ";", but found "]"E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 029: invalid expression, assumed zeroE:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.[/pawn] Link to comment Share on other sites More sharing options...
IstuntmanI Posted January 13, 2012 Report Share Posted January 13, 2012 Titlul. Link to comment Share on other sites More sharing options...
Question
Jack
Salutare am facut comanda aceasta [pawn]if (strcmp(cmdtext, "/nrg", true)==0)
{
new string[256];
if(pNRG[playerid] > 0)
{
if(GetPlayerVehicleID(playerid) != pNRG[playerid])
{
if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
new Float: X, Float: Y, Float: Z, Float: Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, pNRG[playerid], 0);
SetVehiclePos(pNRG[playerid], X, Y, Z);
SetVehicleZAngle(pNRG[playerid], Ang);
SetVehicleHealth(pNRG[playerid], 1000.0);
LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid));
TextDrawShowForPlayer(playerid, MsgNrg);
SetTimerEx("Hide", 3500, false, "d", playerid ,string);
}
else
{
SendClientMessage(playerid,0xCC0000AA, "{00C0FF}You are already sitting on your personal {F81414}NRG-500!");
}
}
else
{
if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
new Float: X, Float: Y, Float: Z, Float: Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
pNRG[playerid] = CreateVehicle(522, X, Y, Z+3, Ang, 75,3, 5000000);
PutPlayerInVehicle(playerid, pNRG[playerid], 0);
SetVehicleVirtualWorld(pNRG[playerid],GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(pNRG[playerid], GetPlayerInterior(playerid));
printf("Personal NRG Created For %s.", PlayerName2(playerid));
TextDrawShowForPlayer(playerid, MsgNrg);
SetTimerEx("Hide", 3500, false, "d", playerid ,string);
for(new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && i != playerid)
{
SetVehicleParamsForPlayer(pNRG[playerid], i, 0, 1);
}
}
}
return 1;
}[/pawn]
si imi da urmatoarele erori
[pawn]E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(254) : warning 202: number of arguments does not match definition
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(320) : warning 213: tag mismatch
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 017: undefined symbol "pNRG"
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : warning 215: expression has no effect
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 001: expected token: ";", but found "]"
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : error 029: invalid expression, assumed zero
E:\Servere SA-MP\Romania New Generation\gamemodes\RNG.pwn(338) : 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]
Link to comment
Share on other sites
1 answer to this question
Recommended Posts