Float.Parse(reader.GetAttribute("X")); brakes CTM menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Float.Parse(reader.GetAttribute("X")); brakes CTM

    Well when I read the XML file for a the CTM locations it works, but then when I added "float.Parse" so I could use them to CTM, But it doesnt work...

    Code is below:
    Code:
                    float x = float.Parse(reader.GetAttribute("X"));
                    float y = float.Parse(reader.GetAttribute("Y"));
                    float z = float.Parse(reader.GetAttribute("Z"));
                    WoW.WriteFloat(0x00CB9814, x);
                    WoW.WriteFloat(0x00CB9818, y);
                    WoW.WriteFloat(0x00CB981C, z);
                    WoW.WriteInt(0x00CB97A4, 4); // Set Click to move state 4=Walk
    Any Ideas guys?
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    Float.Parse(reader.GetAttribute("X")); brakes CTM
  2. #2
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you take all of the elements out of the file at once...? Put them in a List. Use Convert.ToFloat(...) also, it doesn't throw an exception, just returns zero for the value.

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    Why don't you take all of the elements out of the file at once...? Put them in a List. Use Convert.ToFloat(...) also, it doesn't throw an exception, just returns zero for the value.
    I cannot convert to float becuase when I try I get 'System.Convert' does not contain a definition for 'ToFloat'

    Also I dont understand the list and how I would move using the list.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by XAutomation View Post
    I cannot convert to float becuase when I try I get 'System.Convert' does not contain a definition for 'ToFloat'

    Also I dont understand the list and how I would move using the list.
    Convert.ToSingle Method (System)
    List(T) Class (System.Collections.Generic)

    And also your question has nothing to do with WoW memory editing...
    Last edited by TOM_RUS; 01-03-2010 at 06:41 PM.

  5. #5
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I meant ToSingle, my mistake. Sorry about that.

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Idjit.

    element.Attribute("X").Value

    Read the LINQ docs and XElement docs.

Similar Threads

  1. Quotes from Steven Write
    By Amedis in forum Community Chat
    Replies: 2
    Last Post: 11-14-2022, 10:26 AM
  2. "Quotes"
    By Krazyglue in forum Community Chat
    Replies: 2
    Last Post: 11-16-2007, 09:36 PM
  3. WTB Powerleveling - Need Quotes!!
    By Drovos in forum Members Only Gold And Powerleveling Buy Sell
    Replies: 7
    Last Post: 10-14-2007, 10:26 AM
  4. Quote: For a Steam Account!
    By Obama in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 0
    Last Post: 09-16-2007, 07:57 PM
  5. Funny GM quotes
    By shadowfox47 in forum World of Warcraft General
    Replies: 9
    Last Post: 08-13-2007, 07:24 PM
All times are GMT -5. The time now is 11:40 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search