str and temp
#1

Hello there i was onto a property script
it compiles well but, it gives two warning due to which (i think) there is a bug in=game due to these 2 warnings.
The bug is that
i cant save more than 1 property co-ordinate in Propsystem's notepad even if i put the co-ordinates and save the file it automatically disappers next time i open the notepad.
Also the Propowner name, propcost, etc gets fcuked.

the errors:
Код:
C:\DOCUME~1\user\Desktop\ECL~.7\FILTER~1\PROPER~1.PWN(142) : warning 204: symbol is assigned a value that is never used: "str"
C:\DOCUME~1\user\Desktop\ECL~.7\FILTER~1\PROPER~1.PWN(134) : warning 204: symbol is assigned a value that is never used: "tmp"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Any help would be appriciated.

These are the lines

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx, tmp[256];
	cmd = strtok(cmdtext, idx);
^Line : 134+

Код:
new str[128];
^Line 142
Reply
#2

Delete
pawn Код:
tmp[256]
         new str[128];
Reply
#3

it is just a warning, you declare that str and don't use it anywhere in that area of code, so you can remove it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)