Database Problem
- Posted by Lone_EverGreen_Ranger Feb 03, 2011
- 1485 views
Hello,
I am having trouble with my database. I am using Euphoria's default EDS. I'll post my code and my error.It says there is a problem with the names. I'm not sure what is going on. Everything appears to be correct. Perhaps the naming scheme is conflicting with something? I don't know.
ERROR: c:\euphoria\eurpgcs\rpgcsdb.ew:41 <0074>:: Errors resolving the following references: rpgcsdb.ew (41): MAP_NAME rpgcsdb.ew (41): Map_Name if db_insert(MAP_NAME,Map_Name) != DB_OK then
--Mapdata.e constant MAP_NAME = 1, MAP_TYPE = 2, MAP_OVERWORLD_TYPE = 3, MAP_DUNGEON_TYPE = 4, MAP_NORMAL_TYPE = 5, MAP_WIDTH = 6, MAP_HEIGHT = 7, MAP_SIZE = 8, MAP_ENTITIES = 9, MAP_LAYERS = 10, MAP_TILES = 11, MAP_GRAPHIC = 12, MAP_CONNECTION = 13, MAP_ID = 14, MAP_CONNECT_ONE = 15, MAP_CONNECT_TWO = 16, MAP_EVENTS = 17, MAP_OBJECTS = 18 sequence Map_Name = "NoName" integer Map_Type = 0 integer Map_Overworld = 1 integer Map_Dungeon = 2 integer Map_Normal = 3 atom Map_Width = 0 atom Map_Height = 0 atom Map_Size = Map_Width + Map_Height atom Map_Entites = 0 atom Map_Layers = 0 atom Map_Tiles = 0 atom Map_Connection = 1 atom Map_Connection_Two = 2 atom Map_Connections = Map_Connection + Map_Connection_Two atom Map_ID = 0 atom Map_Events = 0 atom Map_Objects = 0 sequence Map_Data = {} sequence gMap_Data = {Map_Size,Map_Entites,Map_Layers,Map_Tiles,Map_Connections,Map_ID,Map_Events,Map_Objects} sequence sMap_Connection = {Map_Name} sequence sMap_Connection_Two = {Map_Name}
--RPGCSdb.ew include std/eds.e include std/get.e include std/sort.e include std/filesys.e include std/io.e include std/os.e include Include/herodata.e include Include/enemydata.e include Include/bossdata.e include Include/vehicledata.e include Include/itemdata.e include Include/element.e include Include/attributedata.e include Include/npcdata.e include Include/mapdata.e include Include/weapondata.e include Include/shopdata.e include Include/attackdata.e include Include/spelldata.e include Include/skilldata.e include Include/sedata.e include Include/bgdata.e include Include/scdata.e include Include/tiledata.e include Include/classdata.e if db_create("EuRPGData", DB_LOCK_NO) != DB_OK then puts(1,"Database could not be created!\n") abort(1) end if if db_open("EuRPGData", DB_LOCK_NO) != DB_OK then puts(1,"Could not open database!\n") abort(1) else if db_create_table("MapTable") != DB_OK then puts(1,"Could not create map table!\n") abort(1) else if db_insert(MAP_NAME,Map_Name) != DB_OK then puts(1,"Could not insert map data!\n") abort(1) end if end if end if