tipforeveryone Posted May 25, 2019 Share Posted May 25, 2019 I put some Pivots in Editor around my map and attach a script to each of them, here is the script function Script:Start() self.entity:SetKeyValue("type","spawnPosition") end In spawn.php //#include <iostream> was on top //#include <list> was on top std::list<Entity> spawnPosition; for (int x = 0; x < world->CountEntities(); x++) { Entity* entity = world->GetEntity(x); if (entity->GetKeyValue("type") == "spawnPosition") { spawnPosition.push_back(entity); } } and I got this error Severity Code Description Project File Line Suppression State Error C2664 'void std::list<int,std::allocator<_Ty>>::push_back(const _Ty &)': cannot convert argument 1 from 'Leadwerks::Entity *' to '_Ty &&' CSCDVMP d:\google drive\w3ateam\game development\cscdvmp\projects\windows\playerclass.cpp 160 what is the right way? 1 Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted May 25, 2019 Share Posted May 25, 2019 Quote std::list<Entity> spawnPosition; Probably should be; Quote std::list<Entity*> spawnPosition; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.