How to eliminate cloning - 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: How to eliminate cloning (
/showthread.php?tid=659453)
How to eliminate cloning -
NV1D3ATD - 03.10.2018
Hello dear people of forum samp today I come to pose an error that I have in the map editor and I do not know how to solve it good is the next I was mapping and and I accidentally gave several times to the "IMPORT PASTE" AND AGAIN, to the final and I just cloned the entire map and I've been deleting the objects object x I've been almost a month in that hahaha plan, what happens is that mapping contains 980 lines of objects and it is difficult to know what are cloned and I would like to know if there is a program that can solve
this error that tells me if a line is repeated to erase it or already exists, I do not know if I explain myself, forgive me, my english is from the nasa salu2
Re: How to eliminate cloning -
NaS - 03.10.2018
Do you have the map as text file, or database?
If you have it in a database, export it to code.
Then paste the code into a file called "input.txt".
Create another file called "unique.bat" in the same folder and paste this batch code into it:
Код:
@echo off
setlocal disabledelayedexpansion
set "prev="
for /f "delims=" %%F in ('sort input.txt') do (
set "curr=%%F"
setlocal enabledelayedexpansion
if "!prev!" neq "!curr!" echo !curr!
endlocal
set "prev=%%F"
) >> output.txt
Save it, then run it and it will output all unique lines into "output.txt".
This only works when the duplicate lines are exactly the same though.
Or use PowerShell:
Код:
type input.txt |Sort-Object -unique |Out-File output.txt
Re: How to eliminate cloning -
NV1D3ATD - 03.10.2018
Quote:
Originally Posted by [HLF]Southclaw
Sublime Text also does this: Edit > Permute Lines > Unique
|

do not leave me
Re: How to eliminate cloning -
CantBeJohn - 04.10.2018
Quote:
Originally Posted by NV1D3ATD
-image-
do not leave me
|
That's notepad++, not sublime.
https://sampforum.blast.hk/showthread.php?tid=531379
Re: How to eliminate cloning -
SaMuRy - 04.10.2018
Quote:
Originally Posted by [HLF]Southclaw
Sublime Text also does this: Edit > Permute Lines > Unique
|
Can you take a look On "SaMuRy" Topic? just posted yday.
Re: How to eliminate cloning -
NV1D3ATD - 05.10.2018
I realized my mistake, I'm an idiot thank you very much to everyone who helped me!