Jump to content

Recommended Posts

Posted

Hello, can someone tell me what i doing wrong here:

 

  // Send to screen
  Flip(0) ;

  TEntity ent;
  string cname;

  for (int i = 1; i <= CountChildren(playermesh); i++)
  {
   ent = GetChild(playermesh,i);
   cname=GetEntityKey(ent,"classname","");
   printf(cname);
   Delay(3000);
  }

 

Thankyou very much

Posted

1>j:\projects_2.50\prueba1_250\prueba1_250.cpp(573) : error C2882: 'std' : illegal use of namespace identifier in expression

1>j:\projects_2.50\prueba1_250\prueba1_250.cpp(574) : error C3861: 'Delay': identifier not found

 

The errors

Posted

Ah, thankyou, and what can i use instead of delay ?

 

New error in printf:

 

1>j:\projects_2.50\prueba1_250\prueba1_250.cpp(573) : error C2664: 'printf' : cannot convert parameter 1 from 'std::string' to 'const char *'

1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Posted

try

 

printf(cname.c_str());

 

 

printf() is old school and doesn't know about the string class so it's function c_str() converts it to plain old char*

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...