Warning: local variable not used

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Post Reply
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Warning: local variable not used

Post by Zaksmeer » Thu Mar 20, 2014 9:06 pm

I am getting this error pertaining to .src and .inc files. Any suggestions what I should be looking for?

qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Re: Warning: local variable not used

Post by qrak » Fri Mar 21, 2014 1:36 am

You defined variable inside program or function which is not used.

Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Warning: local variable not used

Post by Zaksmeer » Fri Mar 21, 2014 7:37 am

so do I just delete that out?

If useScissors.src is saying "Warning: local variable 'tool' not used. I could just delete out 'tool' and pray that it is ok?

qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Re: Warning: local variable not used

Post by qrak » Fri Mar 21, 2014 11:44 am

Try and compile, if script compiles then all is legit.

Tomi
POL Developer
Posts: 478
Joined: Tue Feb 21, 2006 5:08 pm

Re: Warning: local variable not used

Post by Tomi » Sun Mar 23, 2014 8:12 am

sounds like your code is something like program scissors( who, tool ) and in that case if you remove that tool it wont work because an item use script need 2 parameters

If thats the case just add somewhere in your code tool := tool; and the warning is gone, or let it be if you dont care because it does not stop anything from working, its just reporting that you have a variable hanging there never used

Post Reply