Announcement

Collapse
No announcement yet.

Strange file detection problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange file detection problem

    I have moved all my documents over to another driver, this is done right so all symbolic links also point there under env paths and so on, but AMS no longer lets me detect a file what is under the driver for some reason and its 100% there


    Code:
    SystemMessage(From, "Audio Enabled", true, false);	
    if String.Find(Data, "SoundBite||", 1, true) == 1 then
    	MySound = mysplit(Data, "||")  
    	SystemMessage(From, "Sound Request Found "..Data.."("..type(MySound[2]).."):"..tostring(MySound[2]), false, false);
    	if MySound[2] == "Yahoo" then
    		SystemMessage(From, "Request for Yahoo", false, false);
    		if File.DoesExist(_SourceFolder.."\\AutoPlay\\Audio\\y"..tostring(MySound[3])..".ogg") then
    			__SendMe = false;
    			SystemMessage(From, "SoundBite found", false, true);
    			Audio.Load(CHANNEL_USER1, _SourceFolder.."\\AutoPlay\\Audio\\y"..tostring(MySound[3])..".ogg", true, false);
    		else
    			_Meg = ""
    			
    			if fileExists(_SourceFolder.."\\AutoPlay\\Audio\\y"..tostring(MySound[3])..".ogg") then
    				_Meg = "Lua version found the file";
    			end
    			SystemMessage(From, "Unable to find SoundBite ("..type(MySound[3]).."):"..tostring(MySound[3])..":(".._Meg..")", false, true);
    		end
    	end
    Both file detect, audo load and the lua file detect are failing, All the messages are printing back right so I don't understand why its not working.
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    Q:\Users\{User}\Documents\AutoPlay Media Studio 8\Projects\Project404\CD_Root\AutoPlay\Audio\1 .ogg

    At the end of file it's adding a space between 1 and .ogg .. but I can't see why

    The file name is given here

    MySound[3]

    MySound[3] = String.Replace(MySound[3], " ", "", false);
    MySound[3] = String.Replace(MySound[3], "[", "", false);
    MySound[3] = String.Replace(MySound[3], "]", "", false);
    As you can see I remove any spaces but its still added it.

    As you can see here from my system message there is no space at the end and I tried both "" and '' wraps

    SystemMessage(From, 'Request for Yahoo('.._SourceFolder..'\\AutoPlay\\Audio\\'..tos tring(MySound[3])..'.ogg)', false, false);
    I am confused to high heaven now with this ....


    PS unblock H3ll if you have heaven unblocked.
    Plugins or Sources MokoX
    BunnyHop Here

    Comment


    • #3
      The my Split function is

      Code:
      function mysplit(str, sep)
      		local magic = "().%+-*?[]^$"
      		if sep == nil then
      			sep = "%s"
      		elseif string.find(sep, magic, 1, true) then
      			-- escape magic
      			sep = "%"..sep
      		end
              local t = {} ; i=1
              for str in string.gmatch(str, "([^"..sep.."]+)") do
                      t[i] = str
                      i = i + 1
              end
              return t
      end
      Tho I use the String Replace after this I don't see this been the problem, but I can't see where or why its' added a space at the end could it be another space or maybe a line end command I can't see?
      Plugins or Sources MokoX
      BunnyHop Here

      Comment


      • #4
        OK I am getting a little miffed now at first I thought it was the way the text was been sent what was converting the data but I have base64ed it before even sending it and then decode it and use it and AMS down the line thinks it's OK to add a space when were it likes and brakes everything I don't know what is going on, I am really lost here.

        >[SoundBite]:[0]:[nf ]:[SoundBite]<

        >[SoundBite]:[0 ]:[nf]:[SoundBite]<

        On its own it adds spaces to strings for no reason and I can't just remove the the space and it still seems to be there .... I am bloody lost now .. I really am
        Plugins or Sources MokoX
        BunnyHop Here

        Comment


        • #5
          ANY insight IR any at all, come on, I watched people come and go all day, I been working on this project for along time now, and this is getting on my tit

          its added spaces not to just strings I print but stings its sending to other functions no matter what I use to strip away the space, its driving me potty now.

          /SoundBite! Yahoo 0 3 SoundBite, I used this and using space as the splitter in to tables and its still added a space I lost now I really am.
          Plugins or Sources MokoX
          BunnyHop Here

          Comment


          • #6
            This is not a answer but its how I have got it to work at the moment

            PHP Code:
            StringHERE string.gsub(StringHERE"%s"""); 
            I got a crash on %s+ but %s got ride of the space in that last table.
            Plugins or Sources MokoX
            BunnyHop Here

            Comment

            Working...
            X