generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Module script and loop problem

Previous Thread :: Next Thread 
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
17 Aug 2016 01:18 AM
MODULE SCRIPT:
items = {
["A1"] = {"Classic Sword",1,0,303228192,"Sword"},
["A2"] = {"Steel Sword",2,15,0000000,"Sword"},
["A3"] = {"Venom Sword",3,30,0000000,"Sword"},
["A4"] = {"Ruby Sword",4,60,0000000,"Sword"},
}

SCRIPT:
items = require(game.ServerScriptService.GlobalItems)
for i,v in pairs(items) do
print(v[1])
end

PROBLEM:
basically it prints them in the wrong order.
>>Venom Sword
Steel Sword
Classic Sword
Ruby Sword

Why is it doing this??
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
17 Aug 2016 01:20 AM
Dictionaries don't have an order.
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
17 Aug 2016 01:26 AM
Is there any way to fix this?

Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
17 Aug 2016 01:34 AM
Nevermind.

I found a way.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image