gates: all the time same warning but why?
#1

My Code:

Code:
#include <a_samp>
new Gate1a;
forward close();

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" wiz wrate");
	print("--------------------------------------\n");
 	Gate1a = CreateObject(971,321.10000610,-1188.59997559,76.30000305,0.00000000,0.00000000,38.00000000)
  	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/wiz", cmdtext, true, 10) == 0)
	{
       	MoveObject(Gate1a,316.20001221, -1192.45495605, 76.30000305, 10.00);
       	SetTimer("close", 5000, 0);
       	SendClientMessage(playerid,0xFF0000FF,"You are opening a Gate, and will be closed automaticly..");
 	return 1;
	}
	return 0;
}

public close()
{
    MoveObject(Gate1a,321.10000610, -1188.59997559, 76.30000305 10.00);
    return 1;
}

#endif
EROR CODE:
Code:
C:\Users\MaticKepa\Desktop\WIZ WRATA.pwn(39) : warning 203: symbol is never used: "Gate1a"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

Quote:
Originally Posted by kepa333
View Post
My Code:

Code:
#include <a_samp>
new Gate1a;
forward close();

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" wiz wrate");
	print("--------------------------------------\n");
 	Gate1a = CreateObject(971,321.10000610,-1188.59997559,76.30000305,0.00000000,0.00000000,38.00000000)
  	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/wiz", cmdtext, true, 10) == 0)
	{
       	MoveObject(Gate1a,316.20001221, -1192.45495605, 76.30000305, 10.00);
       	SetTimer("close", 5000, 0);
       	SendClientMessage(playerid,0xFF0000FF,"You are opening a Gate, and will be closed automaticly..");
 	return 1;
	}
	return 0;
}

public close()
{
    MoveObject(Gate1a,321.10000610, -1188.59997559, 76.30000305 10.00);
    return 1;
}

#endif
EROR CODE:
Code:
C:\Users\MaticKepa\Desktop\WIZ WRATA.pwn(39) : warning 203: symbol is never used: "Gate1a"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
EDIT: srry didn't say gtae1a
Reply
#3

any one?
Reply
#4

Warnings Are Fine, its errors you need to look out for. First, is the script working ingame? If it isnt, reply.
Reply
#5

Quote:
Originally Posted by JAMMIEISFTW
View Post
Warnings Are Fine, its errors you need to look out for. First, is the script working ingame? If it isnt, reply.
That's rubbish advice! Of course warnings are not fine.

You forgot to #define FILTERSCRIPT at the top of your script.
Reply
#6

Joch, I saw it wasn't a serious warning, if it was working correctly, it's fine, correct?
Reply
#7

use
pawn Code:
#pragma unused Gate1a
Reply
#8

Quote:
Originally Posted by (*|Flake|*)
View Post
use
pawn Code:
#pragma unused Gate1a
Wrong! I gave the right solution to be honest.

And @ JAMMIEISFTW - if it gives a warning, there is something wrong which should be fixed.
Reply
#9

Quote:
Originally Posted by Jochemd
View Post
Wrong! I gave the right solution to be honest.
Indeed.

Quote:
Originally Posted by Jochemd
View Post
You forgot to #define FILTERSCRIPT at the top of your script.
Either that, or remove the preprocessor directives altogether (lines that start with #).
Reply
#10

Quote:
Originally Posted by Vince
View Post
Either that, or remove the preprocessor directives altogether (lines that start with #).
Actually you shouldn't do that to - there are certain includes which check if a script is a filterscript by using "#if defined FILTERSCRIPT". The directives SHOULD be used, although not many people realise it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)