Jump to content

Tables...


Anubhav

Recommended Posts

  
spawnPoints = {} 
function insertSpawnPoints() 
spawnPoints."The Tank"."TestMap" = "0,0,0" 
end 
function getTeamSpawnPoint(team,map) 
return spawnPoints[team][map] 
end 
  

Will it return 0,0,0?

I am not sure because I am not very good in tables!

Link to comment

Use this:

 spawnPoints = {} 
function insertSpawnPoints() 
    spawnPoints["The Tank"]["TestMap"] = "0,0,0" 
end 
  
function getTeamSpawnPoint(team,map) 
    return spawnPoints[team][map] 
end 
  

and to get it to return 0,0,0 you need to use this:

getTeamSpawnPoint ( "The Tank", "Testmap" ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...