Need fix for this Error -
IbeatS - 03.02.2014
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4626) : error 017: undefined symbol "MAX_GATES"
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4637) : error 017: undefined symbol "GateInfo"
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4637) : warning 215: expression has no effect
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4637) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4637) : error 029: invalid expression, assumed zero
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(4637) : fatal error 107: too many error messages on one line
Re: Need fix for this Error -
Lidor124 - 03.02.2014
Show us the lines of your errors
Re: Need fix for this Error -
IbeatS - 03.02.2014
stock LoadGates()
{
new file[64];
for(new t=0; t<=MAX_GATES; t++)
{
format(file,sizeof(file),"gates/gate%d.txt",t);
new Float: X, Float: Y, Float: Z;
X = dini_Float(file,"floatx");
Y = dini_Float(file,"floaty");
Z = dini_Float(file,"floatz");
new F = dini_Int(file,"factionid");
new GID = dini_Int(file,"gateid");
if(dini_Exists(file))
{
GateInfo[t][gModel] = 976;
GateInfo[t][gFaction] = F;
GateInfo[t][gCX] = X;
GateInfo[t][gCY] = Y;
GateInfo[t][gCZ] = Z;
GateInfo[t][gSpeed] = 5;
new string[256];
format(string, sizeof(string), ".::Gate %d::.\nCmd: /fgate\nFaction Owner: %d",t,GateInfo[t][gFaction]);
GateInfo[GID][gGate] = CreateDynamicObject(976, X, Y, Z-1, 0, 0, dini_Float(file,"facingangle"));
GateInfo[t][gText] = CreateDynamic3DTextLabel(string, 0xFFFFFFFF, GateInfo[t][gCX], GateInfo[t][gCY], GateInfo[t][gCZ], 10);
GateInfo[t][gStatus] = 0;
}
}
print("Gates loaded successfully.");
return 1;
}
Re: Need fix for this Error -
BullseyeHawk - 03.02.2014
Did you declare the enum&new of GateInfo? (enum _x { ... }; new GateInfo[MAX_GATES][_x]; )
Did you declare how much is MAX_GATES? (#define MAX_GATES .. || new MAX_GATES = ..; )
Re: Need fix for this Error -
IbeatS - 03.02.2014
i didn't Understand what u say
,Can u Fix the error which in code plz ,thanks
Re: Need fix for this Error -
BullseyeHawk - 03.02.2014
How will you learn then?
You need to define this code inside your gamemode.
This is the skeleton of the code:
pawn Код:
// How many gates do we want?
#define MAX_GATES 2
// our array skeleton.
enum gateInfo
{
// Example skeleton_name
gID,
// Your code here.
}
// Declaring our skeleton array under one single var.
new GateInfo[MAX_GATES][gateInfo];
// Usage: GateInfo[GATE_ID][SKELETON_NAME];
Re: Need fix for this Error -
IbeatS - 03.02.2014
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(6293) : error 029: invalid expression, assumed zero
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(6293 -- 6294) : error 029: invalid expression, assumed zero
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(6294 -- 6295) : error 029: invalid expression, assumed zero
C:\Documents and Settings\aa\My Documents\Downloads\Current Online Italy Mafia\gamemodes\IMV6.pwn(6294 -- 6295) : fatal error 107: too many error messages on one line
Codes
if(newkeys & 2 && IsPlayerInAnyVehicle(playerid))
{
new i = playerid;
for(new h=0; h<=MAX_GATES; h++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, GateInfo[h][gCX], GateInfo[h][gCY], GateInfo[h][gCZ]))
{
OnPlayerCommandText(playerid, "/gate");
}
}
}*/
if(newkeys & 2 && IsPlayerInAnyVehicle(playerid))
{
new i = playerid;
for(new g; g < sizeof(Gates); g++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Gates[g][closeX],Gates[g][closeY],Gates[g][closeZ]) || IsPlayerInRangeOfPoint(i, 20.0, Gates[g][openX],Gates[g][openY],Gates[g][openZ]))
{
OnPlayerCommandText(playerid, "/gate");
}
}
}
Re: Need fix for this Error -
BullseyeHawk - 03.02.2014
Give out the whole function, and show us the lines.
pawn Код:
myFunction(...)
{
// code ..
// line 6293
// line 6295
// code ..
}
Re: Need fix for this Error -
IbeatS - 03.02.2014
As u know i am Newbie Scripter
but the codes here
if(newkeys & 2 && IsPlayerInAnyVehicle(playerid))
{
new i = playerid;
for(new h=0; h<=MAX_GATES; h++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, GateInfo[h][gCX], GateInfo[h][gCY], GateInfo[h][gCZ]))
{
OnPlayerCommandText(playerid, "/gate");
}
}
}*/ {Code number 6293}
if(newkeys & 2 && IsPlayerInAnyVehicle(playerid)) {Code Number 6294}
{
new i = playerid;
for(new g; g < sizeof(Gates); g++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Gates[g][closeX],Gates[g][closeY],Gates[g][closeZ]) || IsPlayerInRangeOfPoint(i, 20.0, Gates[g][openX],Gates[g][openY],Gates[g][openZ]))
{
OnPlayerCommandText(playerid, "/gate");
}
}
}
Re: Need fix for this Error -
iZN - 03.02.2014
Please use [pawn] your code here [/pawn] before posting any code. I still can't get your code, where is the problem at?