Loading object from database
#1

Hello, I would like to create a system object by loading database.

I tried to create more code with loops but nothing works no object load.
I do not know if I have to do a query object or a query for all the objects I want to use.
Here above all the structure of my table 'objects'

Код:
CREATE TABLE IF NOT EXISTS `objets` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Id unique de l'objet',
  `mapid` int(11) NOT NULL, COMMENT 'Id de la map au quelle appartient objets',
  `modelid` int(11) NOT NULL DEFAULT '-1',
  `FloatX` float NOT NULL DEFAULT '0',
  `FloatY` float NOT NULL DEFAULT '0',
  `FloatZ` float NOT NULL DEFAULT '0',
  `FloatrX` float NOT NULL DEFAULT '0',
  `FloatrY` float NOT NULL DEFAULT '0',
  `FloatrZ` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
Here is the code that I find to pawn objects by loading loop but the problem is that I do not want to use 'sscanf' or something like that so I tried to change but I do not understand.

http://pastebin.com/uhviMbqD

Thank you anyway for the help you can give me.

Vince
Reply
#2

if you don't want to use sscanf, you can use strtok or explode
Reply
#3

and he can show me a model?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)