SA-MP Forums Archive
Need Script Gate help - 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: Need Script Gate help (/showthread.php?tid=344528)



Need Script Gate help - se7evolution - 21.05.2012

Hey guys,
I am new on this forums but i always watch the forums as guest. Anyways.
I am scripting a gate that can be open /open and close in 10 seconds.
But there is a big big problem
after i compile it it keeps saying Symbol is assigned a value that is never used: "ent"
So i searched like for 2 days how to repair it but still gets the same error.
So i am searching a guy that can help me to script it..
here are some information:
commads
/open - to open it.
Objects
CLOSED: CreateObject(969, -2425.8000488281, 259.89999389648, 34.200000762939, 0, 0, 8;
OPEN: CreateObject(3511, -2426.1000976563, 259.10000610352, 32.5, 0, 0, 2);
Please pm me if you want more information.
Thanks,
I am sorry if i posted this on an mistaken topic please move it if this is not the right topic.
Regards,
Paco


Re: Need Script Gate help - miokie - 21.05.2012

It's just a warning which is caused by you defining 'ent' and not using it. Just remove the new ent; part from your code and it will get rid of the warning.


Re: Need Script Gate help - se7evolution - 21.05.2012

Quote:
Originally Posted by miokie
Посмотреть сообщение
It's just a warning which is caused by you defining 'ent' and not using it. Just remove the new ent; part from your code and it will get rid of the warning.
I just tried again but this time i changed "new ent;" to "new gate;" now this happened
error 017: undefined symbol "gate"


Re: Need Script Gate help - Faisal_khan - 21.05.2012

Buddy paste your code.


Re: Need Script Gate help - miley1 - 21.05.2012

Add me on an Instant messenging , [[ Can be find in My Profile ]] Ill help you with it a soon as i get time for it


Re: Need Script Gate help - se7evolution - 21.05.2012

this is my script
Код:
#include <a_samp>
#if defined FILTERSCRIPT
new timer[MAX_PLAYERS];
new gate;//here you see i used gate

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	SetGameModeText("Blank Script");
	gate = CreateObject(969, -2425.8000488281, 259.89999389648, 34.200000762939, 0, 0, 88); //this is createobject of closed gate
    return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp("/open", cmdtext, true) == 0)
     {
         MoveObject(gate, -2426.1000976563, 259.10000610352, 32.5, 2.0); //here i used the createobject of "opened gate"
         SendClientMessage(playerid, 0xFF8000FF, "The gate is open to close it use /close.");
         return 1;
     }
     if(strcmp("/close", cmdtext, true) == 0)
     {
         MoveObject(gate, -2425.8000488281, 259.89999389648, 34.200000762939, 4.0); //here i used the createobject of "closed gate"
         SendClientMessage(playerid, 0xFF8000FF, "The gate is closed.");
         return 1;
     }
	 return 0;
}
//i just copied till here otherwide there are too much.
i got this error at the end
C:\Users\WGSoshiPacoIU\Desktop\test2.pwn(37) : error 017: undefined symbol "gate"
C:\Users\WGSoshiPacoIU\Desktop\test2.pwn(93) : error 017: undefined symbol "gate"
C:\Users\WGSoshiPacoIU\Desktop\test2.pwn(99) : error 017: undefined symbol "gate"



Re: Need Script Gate help - Dan. - 21.05.2012

pawn Код:
#define FILTERSCRIPT



Re: Need Script Gate help - se7evolution - 21.05.2012

What do you mean?


Re: Need Script Gate help - Dan. - 21.05.2012

Add that line after:

pawn Код:
#if defined FILTERSCRIPT



Re: Need Script Gate help - se7evolution - 21.05.2012

Quote:
Originally Posted by Dan.
Посмотреть сообщение
Add that line after:

pawn Код:
#if defined FILTERSCRIPT
which line if i may ask?