Pawno Warning Error -
PrislowProductions - 31.05.2014
I tried to Compile the script I was editing and this error came up. I am not sure how to fix this as I am new to scripting so it'd be amazing if someone helped me. +rep to whoever replies a way that fixes.
This is the Error:
Код:
C:\Users\bet\Desktop\UG-RP\gamemodes\UG-RP.pwn(124349) : warning 204: symbol is assigned a value that is never used: "query"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: Pawno Warning Error -
PrislowProductions - 31.05.2014
What do I do to get rid of that error?
Re: Pawno Warning Error -
Lewis Watts - 31.05.2014
There's no point in me making a thread about this error because I have the same problem, but I need help fixing this too.
Re: Pawno Warning Error -
JFF - 31.05.2014
Search for
And delete it
Re: Pawno Warning Error -
Dubya - 31.05.2014
No, don't do that.
Show lines 124300-124400 please.
Re: Pawno Warning Error -
PrislowProductions - 31.05.2014
Alright. Here's lines 124300 - 124400
Код:
db_get_field_assoc(result, "PostBoxPickupZ", field, sizeof(field));
PostBoxInfo[i][PostBoxPickupZ] = floatstr(field);
db_get_field_assoc(result, "PostBoxVirtual", field, sizeof(field));
PostBoxInfo[i][PostBoxVirtual] = strval(field);
PostBoxInfo[i][PostBoxPickup] = CreateDynamicPickup(1239, 23, PostBoxInfo[i][PostBoxPickupX], PostBoxInfo[i][PostBoxPickupY], PostBoxInfo[i][PostBoxPickupZ], PostBoxInfo[i][PostBoxVirtual]);
format(query, sizeof(query), "Post Box (ID: %d)\n\nType /sendmail to send your letters.", i);
PostBoxInfo[i][PostBoxLabel] = CreateStreamed3DTextLabel(query, GREEN, PostBoxInfo[i][PostBoxPickupX], PostBoxInfo[i][PostBoxPickupY], PostBoxInfo[i][PostBoxPickupZ], 10.0, PostBoxInfo[i][PostBoxVirtual]);
PostBoxInfo[i][PostBoxObject] = CreateDynamicObject(1258, PostBoxInfo[i][PostBoxX], PostBoxInfo[i][PostBoxY], PostBoxInfo[i][PostBoxZ], 0.0, 0.0, PostBoxInfo[i][PostBoxAngle], PostBoxInfo[i][PostBoxVirtual]);
PostBoxInfo[i][PostBoxSQL] = i;
db_next_row(result);
}
}
db_free_result(result);
return 1;
}
stock SavePostBoxes()
{
new query[256];
for (new i = 0; i < MAX_POSTBOXES; i ++)
{
if (!PostBoxInfo[i][PostBoxActive]) continue;
format(query, sizeof(query), "UPDATE `PostBoxes` SET `PostBoxX` = '%f', `PostBoxY` = '%f', `PostBoxZ` = '%f', `PostBoxAngle` = '%f', `PostBoxPickupX` = '%f', `PostBoxPickupY` = '%f', `PostBoxPickupZ` = '%f', `PostBoxVirtual` = '%d' WHERE `PostBoxID` = '%d'",
PostBoxInfo[i][PostBoxX],
PostBoxInfo[i][PostBoxY],
PostBoxInfo[i][PostBoxZ],
PostBoxInfo[i][PostBoxAngle],
PostBoxInfo[i][PostBoxPickupX],
PostBoxInfo[i][PostBoxPickupY],
PostBoxInfo[i][PostBoxPickupZ],
PostBoxInfo[i][PostBoxVirtual],
PostBoxInfo[i][PostBoxSQL]
);
db_query(MailDB, query);
}
return 1;
}
stock LoadLetters()
{
new query[128], field[256], DBResult:result;
result = db_query(MailDB, "SELECT * FROM `Letters`");
if (db_num_rows(result) != 0)
{
for (new i = 0, rows = db_num_rows(result); i < rows; i ++)
{
LetterInfo[i][LetterActive] = true;
db_get_field_assoc(result, "LetterUnread", field, sizeof(field));
LetterInfo[i][LetterUnread] = (strval(field) == 1) ? (true) : (false);
db_get_field_assoc(result, "LetterSent", field, sizeof(field));
LetterInfo[i][LetterSent] = (strval(field) == 1) ? (true) : (false);
db_get_field_assoc(result, "LetterAddress", field, sizeof(field));
format(LetterInfo[i][LetterAddress], 128, "%s", field);
db_get_field_assoc(result, "LetterSender", field, sizeof(field));
format(LetterInfo[i][LetterSender], 24, "%s", field);
db_get_field_assoc(result, "LetterRecipient", field, sizeof(field));
format(LetterInfo[i][LetterRecipient], 24, "%s", field);
db_get_field_assoc(result, "LetterMessage", field, sizeof(field));
format(LetterInfo[i][LetterMessage], 256, "%s", field);
LetterInfo[i][LetterSQL] = i;
db_next_row(result);
}
}
db_free_result(result);
return 1;
}
stock SaveLetters()
{
new query[768];
for (new i = 0; i < MAX_LETTERS; i ++)
{
if (!LetterInfo[i][LetterActive]) continue;
format(query, sizeof(query), "UPDATE `Letters` SET `LetterUnread` = '%d', `LetterSent` = '%d', `LetterAddress` = '%s', `LetterSender` = '%s', `LetterRecipient` = '%s', `LetterMessage` = '%s' WHERE `LetterID` = '%d'",
(LetterInfo[i][LetterUnread]) ? (1) : (0), (LetterInfo[i][LetterSent]) ? (1) : (0), LetterInfo[i][LetterAddress], LetterInfo[i][LetterSender], LetterInfo[i][LetterRecipient], LetterInfo[i][LetterMessage], LetterInfo[i][LetterSQL]);
db_query(MailDB, query);
}
return 1;
}
stock ShowLetters(playerid, bool:message = true)
{
if (GetPlayerVirtualWorld(playerid) == PlayerInfo[playerid][pHouseKey] || GetPlayerVirtualWorld(playerid) == PlayerInfo[playerid][pHouseKey2] || GetPlayerVirtualWorld(playerid) == PlayerInfo[playerid][pHouseKey3] || GetPlayerVirtualWorld(playerid) == PlayerInfo[playerid][pHouseKey4])
{
new
letters,
str[128],
string[2800]
;
strdel(string, 0, strlen(string));
for (new i = 0; i < MAX_LETTERS; i ++)
{
Re: Pawno Warning Error -
biker122 - 31.05.2014
Navigate to LoadLetters stock
pawn Код:
new query[128], field[256], DBResult:result;
to
pawn Код:
new field[256], DBResult:Result;
Re: Pawno Warning Error -
PrislowProductions - 31.05.2014
What do you mean by that?
Re: Pawno Warning Error -
biker122 - 31.05.2014
Ewww, Go to LoadLetters stock:
change
pawn Код:
new query[128], field[256], DBResult:Result;
TO
pawn Код:
new field[256], DBResult:Result;
Re: Pawno Warning Error -
PrislowProductions - 31.05.2014
It now comes up with these errors when I try to compile:
Код:
C:\Users\bet\Desktop\New folder\UG-RP.pwn(923) : error 017: undefined symbol "E_QUERY_EXISTS"
C:\Users\bet\Desktop\New folder\UG-RP.pwn(923) : warning 215: expression has no effect
C:\Users\bet\Desktop\New folder\UG-RP.pwn(923) : error 001: expected token: ";", but found "]"
C:\Users\bet\Desktop\New folder\UG-RP.pwn(923) : error 029: invalid expression, assumed zero
C:\Users\bet\Desktop\New folder\UG-RP.pwn(923) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.