Help with a Warning. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with a Warning. (
/showthread.php?tid=390469)
Help with a Warning. -
Laure - 06.11.2012
Couldnt deal with the following Warning.
Код:
Warning:Tag Mismatch
Which is causing of the like
Код:
stock SetBizMessage(bizid, bMessage, message)
{
BizInfo[bizid][bMessage] = message;// This is the line of the warning.
return 1;
}
Help me and i will reputate you.
Re: Help with a Warning. -
mamorunl - 06.11.2012
If there are no special stuff set for a variable it is automatically an integer. I take it that 'message' a string is so you would need to specify the length of that string (or actually,, just two brackets are good) so:
new message; // an integer value is expected
new message[]; // a string value is expected (length does not matter here)
new bool:message; // a boolean value is expected (true/false)
new Text:message; // for a 3Dtextlabel or something
new Float:message; // a floatation point value is expected (eg 12.34)
BizInfo[bizid][bMessage] is probably a string and message is an int so that causes a TAG mismatch (the TAG is the type here (int - string))
Re: Help with a Warning. -
ViniBorn - 06.11.2012
Try
pawn Код:
format(BizInfo[bizid][bMessage], sizeof(BizInfo[bizid][bMessage]), message);
Re: Help with a Warning. -
Plovix - 06.11.2012
Try this:
Код:
stock SetBizMessage(bizid, bMessage, message[])
{
BizInfo[bizid][bMessage] = message;
return 1;
}