Re: Database Problem

new topic     » goto parent     » topic index » view thread      » older message » newer message
Lone_EverGreen_Ranger said...

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 

Ok, the message is a bit ambiguous. Those names can't be resolved because they can't be seen and not because they conflict with anything.

They can't be seen because they have been defined as 'local' scope within 'mapdata.e', which means that only code inside mapdata.e can see them.

I'm assuming you are using Eu4, so change the definition to ...

public constant MAP_NAME = 1, ... 
	   
public sequence Map_Name = "NoName"  
 
ETC ETC ETC 

You might also consider using enum instead of constant.

public enum 
         MAP_NAME, 
	 MAP_TYPE, 
	 MAP_OVERWORLD_TYPE, 
	 MAP_DUNGEON_TYPE, 
   etc etc etc 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu