Problems with warnings ! Need help [Rep ++] -
NewCityRoleplay - 05.12.2013
Having problems with some warnings and I cant seem to see any problems with it... If you look below the warnings and the line which it points to is there.
Код:
C:\Users\Nathan Cooper\Desktop\new\los scriptos\script.pwn(1159) : warning 213: tag mismatch
C:\Users\Nathan Cooper\Desktop\new\los scriptos\script.pwn(3248) : warning 213: tag mismatch
C:\Users\Nathan Cooper\Desktop\new\los scriptos\script.pwn(3265) : warning 213: tag mismatch
C:\Users\Nathan Cooper\Desktop\new\los scriptos\script.pwn(3282) : warning 211: possibly unintended assignment
C:\Users\Nathan Cooper\Desktop\new\los scriptos\script.pwn(3305) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Up there are the warnings now here are the " Tag Mismatch " warning lines.
MISMATCH 1: LINE 1159
Код:
ATMInfo[idx][tmModel] = CreateDynamicObject(2942,ATMInfo[idx][tmX],ATMInfo[idx][tmY],ATMInfo[idx][tmZ],0,0,ATMInfo[idx][tmA],0);
format(label,sizeof(label),"ATM Storage $%d\nID:%d",ATMInfo[idx][tmBalance], idx);
ATMInfo[idx][tmText] = CreateDynamic3DTextLabel(label,COLOR_GREEN,ATMInfo[idx][tmX],ATMInfo[idx][tmY],ATMInfo[idx][tmZ], 15);
MISMATCH 2: LINE 3248
Код:
format(string,sizeof(string),"Total ATM Balance $%d\nID:%d",ATMInfo[idx][tmBalance], idx);
ATMInfo[idx][tmText] = CreateDynamic3DTextLabel(string,COLOR_GREEN,ATMInfo[idx][tmX],ATMInfo[idx][tmY],ATMInfo[idx][tmZ],15.0);
MISMATCH 3: LINE 3265
Код:
DestroyDynamicObject(ATMInfo[idx][tmModel]);
DestroyDynamic3DTextLabel(ATMInfo[idx][tmText]);
ATMInfo[idx][tmX] = 0;
Now we're onto the Possibly unintended assignment
Assignment Warning 1: LINE 3282
Код:
if(!IsPlayerInRangeOfPoint(playerid, 5, ATMInfo[idx][tmX], ATMInfo[idx][tmY], ATMInfo[idx][tmZ])) return SendClientMessage(playerid,COLOR_GRAD1,"You are not in range of an ATM!");
if(PlayerInfo[playerid][pBankOpen] = 0)
if(sscanf(params,"d", amount)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /awithdraw [Amount]");
{
Assignment Warning 2: LINE 3305
Код:
if(!IsPlayerInRangeOfPoint(playerid, 5, ATMInfo[idx][tmX], ATMInfo[idx][tmY], ATMInfo[idx][tmZ])) return SendClientMessage(playerid,COLOR_GRAD1,"You are not in range of an ATM!"); {
if(PlayerInfo[playerid][pBankOpen] = 1) {
if(sscanf(params,"d", amount)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /awithdraw [Amount]");
If you cannot see the problem and wish to help me further PM me and add me on skype please.
Re: Problems with warnings ! Need help [Rep ++] -
xVIP3Rx - 05.12.2013
pawn Код:
ATMInfo[idx][tmY]
ATMInfo[idx][tmZ]
ATMInfo[idx][tmX]
Should be Floats, Are you sure they're floats ? show them please..
Re: Problems with warnings ! Need help [Rep ++] -
Threshold - 06.12.2013
For tag mismatch errors...
In your enum for ATMInfo...
pawn Код:
enum ATMData //This is your enum
{
//Other stuff here
tmText,
//Other stuff here
}
Replace:
with:
--
For unintended assignment errors...
Change:
pawn Код:
if(PlayerInfo[playerid][pBankOpen] = 0)
to:
pawn Код:
if(PlayerInfo[playerid][pBankOpen] == 0)
and change:
pawn Код:
if(PlayerInfo[playerid][pBankOpen] = 1)
to:
pawn Код:
if(PlayerInfo[playerid][pBankOpen] == 1)
Re: Problems with warnings ! Need help [Rep ++] -
NewCityRoleplay - 06.12.2013
Thank you both so much!