![]() |
Level Updater Scanner
So, I'm trying to do a check on every level uploaded to the server. However, It's coming out with some weird things when I am wanting to write the lines back. Here's the script, basically what it is doing is running through each line in the level uploaded and checking if it's got anything illegal in it, if it does it deletes that entire NPC [from 'NPC image x y' to 'NPCEND'], here's what I have so far...
HTML Code:
function onLevelFileUpdated(file){ |
What error are you experiencing? You never mentioned.
|
Also I might add that I think such a thing could be easily avoided
e.g. PHP Code:
|
Quote:
|
Quote:
Well, it's cutting out scripts, here's the original level HTML Code:
NPC - 49 17HTML Code:
NPC - 49 17 |
Quote:
|
Probably because you're deleting entrys in an array currently used for the loop, thus messing it up. You should never manipulate the same array as the loop uses, use a copy of it and update the original after the loop :p
PHP Code:
Instead, do something like: PHP Code:
|
i don't think i am, or am i? o_O
|
Quote:
|
damn!! try fix it plz ziro, i have faith in u!! :D
|
Quote:
|
Sorry, Angelu kept me busy on client :p
I didn't quite fix yours, but I did make a version that works. Feel free to use it, or whatever. PHP Code:
|
yay llove u long time xxxxxxxxx
|
| All times are GMT +2. The time now is 04:26 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.