<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[c++] Cod4 rcon]]></title><description><![CDATA[<p>hi könnt mir jemand sagen wieso des prog mit der funktion probs hat und abstürzt</p>
<pre><code class="language-cpp">void ParsePLAYERDATA(string DATA) {

	ListView_DeleteAllItems(hWndLV1);
	playerL.clear();
	string NAME;
	string SCORE;
	string PING;
	string GUID;

	string::size_type p1;
	string::size_type p2;
	string tmp;
	string tmp5;
	string buf;
	string trash;

	tmp5 = DATA;

	p2 = tmp5.find_first_of(&quot;\n&quot;, 0);
	trash += tmp5.substr(0, p2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	p2 = tmp5.find_first_of(&quot;\n&quot;, 0);
	trash += tmp5.substr(0, p2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	p2 = tmp5.find_first_of('\n', 0);

	trash += tmp5.substr(1, p2 - 2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	tmp = tmp5;

	trash = &quot;&quot;;

	while (1) {

		string daten;

		p1 = tmp.find_first_of(&quot;\n&quot;, 0);

		if (p1 == string::npos) {
			break;
		}

		daten += tmp.substr(0, p1);

		tmp = tmp.substr(p1 + 1, tmp.length() - (p1 + 1));

		SCORE += daten.substr(4, 5);
		PING += daten.substr(11, 4);
		GUID += daten.substr(15, 32);
		NAME += daten.substr(48, 15);

		playerL.push_back(new Player(NAME.c_str(), SCORE.c_str(), PING.c_str(),
				GUID.c_str()));

		NAME.clear();
		SCORE.clear();
		PING.clear();
		GUID.clear();
		daten.clear();

	}

	char szText[150];
	int size2;
	size2 = playerL.size();

	for (int i = 0; i &lt; size2; i++) {
		LVITEM lvi;
		memset(&amp;lvi, 0, sizeof(lvi));
		lvi.mask = LVIF_TEXT;
		lvi.cchTextMax = 300;
		lvi.iItem = i;
		lvi.iSubItem = 0;
		string name;
		name += playerL.at(i)-&gt;getName();
		sprintf(szText, &quot;%s&quot;, name.c_str());

		lvi.pszText = szText;
		ListView_InsertItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 1;
		string score;
		score += playerL.at(i)-&gt;getScore();
		sprintf(szText, &quot;%s&quot;, score.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 2;
		string ping;
		ping += playerL.at(i)-&gt;getPing();
		sprintf(szText, &quot;%s&quot;, ping.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 3;
		string guid;
		guid += playerL.at(i)-&gt;getGuid();
		sprintf(szText, &quot;%s&quot;, guid.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);
	}
}
</code></pre>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/243573/c-cod4-rcon</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 03:29:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/243573.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jun 2009 13:07:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 13:07:34 GMT]]></title><description><![CDATA[<p>hi könnt mir jemand sagen wieso des prog mit der funktion probs hat und abstürzt</p>
<pre><code class="language-cpp">void ParsePLAYERDATA(string DATA) {

	ListView_DeleteAllItems(hWndLV1);
	playerL.clear();
	string NAME;
	string SCORE;
	string PING;
	string GUID;

	string::size_type p1;
	string::size_type p2;
	string tmp;
	string tmp5;
	string buf;
	string trash;

	tmp5 = DATA;

	p2 = tmp5.find_first_of(&quot;\n&quot;, 0);
	trash += tmp5.substr(0, p2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	p2 = tmp5.find_first_of(&quot;\n&quot;, 0);
	trash += tmp5.substr(0, p2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	p2 = tmp5.find_first_of('\n', 0);

	trash += tmp5.substr(1, p2 - 2);

	tmp5 = tmp5.substr(p2 + 1, tmp5.length() - (p2 + 1));

	tmp = tmp5;

	trash = &quot;&quot;;

	while (1) {

		string daten;

		p1 = tmp.find_first_of(&quot;\n&quot;, 0);

		if (p1 == string::npos) {
			break;
		}

		daten += tmp.substr(0, p1);

		tmp = tmp.substr(p1 + 1, tmp.length() - (p1 + 1));

		SCORE += daten.substr(4, 5);
		PING += daten.substr(11, 4);
		GUID += daten.substr(15, 32);
		NAME += daten.substr(48, 15);

		playerL.push_back(new Player(NAME.c_str(), SCORE.c_str(), PING.c_str(),
				GUID.c_str()));

		NAME.clear();
		SCORE.clear();
		PING.clear();
		GUID.clear();
		daten.clear();

	}

	char szText[150];
	int size2;
	size2 = playerL.size();

	for (int i = 0; i &lt; size2; i++) {
		LVITEM lvi;
		memset(&amp;lvi, 0, sizeof(lvi));
		lvi.mask = LVIF_TEXT;
		lvi.cchTextMax = 300;
		lvi.iItem = i;
		lvi.iSubItem = 0;
		string name;
		name += playerL.at(i)-&gt;getName();
		sprintf(szText, &quot;%s&quot;, name.c_str());

		lvi.pszText = szText;
		ListView_InsertItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 1;
		string score;
		score += playerL.at(i)-&gt;getScore();
		sprintf(szText, &quot;%s&quot;, score.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 2;
		string ping;
		ping += playerL.at(i)-&gt;getPing();
		sprintf(szText, &quot;%s&quot;, ping.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);

		lvi.iSubItem = 3;
		string guid;
		guid += playerL.at(i)-&gt;getGuid();
		sprintf(szText, &quot;%s&quot;, guid.c_str());
		lvi.pszText = szText;
		ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi);
	}
}
</code></pre>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728829</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728829</guid><dc:creator><![CDATA[cod4 gamer]]></dc:creator><pubDate>Thu, 18 Jun 2009 13:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 13:24:13 GMT]]></title><description><![CDATA[<p>hab für den eintrag nur wenig zeit gehabt wär net wenn ir jemand helfen will dann schick ich ihm mal den ganzen source code</p>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728839</guid><dc:creator><![CDATA[cod4 gamer ^^]]></dc:creator><pubDate>Thu, 18 Jun 2009 13:24:13 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 13:59:42 GMT]]></title><description><![CDATA[<p>Was soll das Programm den überhaupt machen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728861</guid><dc:creator><![CDATA[sup]]></dc:creator><pubDate>Thu, 18 Jun 2009 13:59:42 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:01:20 GMT]]></title><description><![CDATA[<p>dDas Programm ruft server informationen ab z.B. über spieler etc..<br />
Man kann damit player kicken bannen map changen etc,,<br />
nur ist mein c+++ (is ja nur hobby) eher ***** schlecht<br />
kannste mir mal diene e-mail sagen dann würd ichs dir ma schicken?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728863</guid><dc:creator><![CDATA[cod4 gamer ^3]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:01:20 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:01:23 GMT]]></title><description><![CDATA[<p>Was hast du denn schon getan (damit wir nicht alles doppelt machen)?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728864</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:01:23 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:02:33 GMT]]></title><description><![CDATA[<p>Sobald der hierhin kommt bleibt er in der Schleife</p>
<pre><code class="language-cpp">while (1) { 

        string daten; 

        p1 = tmp.find_first_of(&quot;\n&quot;, 0); 

        if (p1 == string::npos) { 
            break; 
        } 

        daten += tmp.substr(0, p1); 

        tmp = tmp.substr(p1 + 1, tmp.length() - (p1 + 1)); 

        SCORE += daten.substr(4, 5); 
        PING += daten.substr(11, 4); 
        GUID += daten.substr(15, 32); 
        NAME += daten.substr(48, 15); 

        playerL.push_back(new Player(NAME.c_str(), SCORE.c_str(), PING.c_str(), 
                GUID.c_str())); 

        NAME.clear(); 
        SCORE.clear(); 
        PING.clear(); 
        GUID.clear(); 
        daten.clear(); 

    }
</code></pre>
<p>Hast du z.b. mal mit einem Debugger gekuckt ob der Überhaupt diesen Code verwendet O_o</p>
<pre><code class="language-cpp">char szText[150]; 
    int size2; 
    size2 = playerL.size(); 

    for (int i = 0; i &lt; size2; i++) { 
        LVITEM lvi; 
        memset(&amp;lvi, 0, sizeof(lvi)); 
        lvi.mask = LVIF_TEXT; 
        lvi.cchTextMax = 300; 
        lvi.iItem = i; 
        lvi.iSubItem = 0; 
        string name; 
        name += playerL.at(i)-&gt;getName(); 
        sprintf(szText, &quot;%s&quot;, name.c_str()); 

        lvi.pszText = szText; 
        ListView_InsertItem(hWndLV1,(LPARAM)&amp;lvi); 

        lvi.iSubItem = 1; 
        string score; 
        score += playerL.at(i)-&gt;getScore(); 
        sprintf(szText, &quot;%s&quot;, score.c_str()); 
        lvi.pszText = szText; 
        ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi); 

        lvi.iSubItem = 2; 
        string ping; 
        ping += playerL.at(i)-&gt;getPing(); 
        sprintf(szText, &quot;%s&quot;, ping.c_str()); 
        lvi.pszText = szText; 
        ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi); 

        lvi.iSubItem = 3; 
        string guid; 
        guid += playerL.at(i)-&gt;getGuid(); 
        sprintf(szText, &quot;%s&quot;, guid.c_str()); 
        lvi.pszText = szText; 
        ListView_SetItem(hWndLV1,(LPARAM)&amp;lvi); 
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1728865</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728865</guid><dc:creator><![CDATA[sup]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:02:33 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:03:26 GMT]]></title><description><![CDATA[<p>so arbeit is rum ^^<br />
wenn cih daheim bin schilder ich ma genau was da net ganz einbahnfrei läuft</p>
<p>thx (das ihr wenigstens geantwortet habt.. bei meinem beknackten eintrag) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728867</guid><dc:creator><![CDATA[cod4 gamer ^4]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:03:26 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:05:24 GMT]]></title><description><![CDATA[<p>ja verwendet er ich geb dir ma den source code mit .exe ja?<br />
dann kannste ma sehen ich hab auch eine test funktion eingebaut normalerweise muss er ja erstma die daten vom server empfangen und mit der test funtktion liest er se aus na .txt und da gehts einbahnfrei</p>
<p>bis gleich ^^ (wenn die bahn net wieder zu spät kommt)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728869</guid><dc:creator><![CDATA[cod4 gamer ^5]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 14:52:56 GMT]]></title><description><![CDATA[<p>Verwende mal weniger Namen wie tmp..1..2..3..bla. Mehr Schreiben, aber mehr Übersicht.<br />
Und sag mal konkret, was gemacht werden soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728909</guid><dc:creator><![CDATA[Help0r]]></dc:creator><pubDate>Thu, 18 Jun 2009 14:52:56 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Thu, 18 Jun 2009 15:18:12 GMT]]></title><description><![CDATA[<p>so erstma gescheit regestriert..<br />
Erstma thx das ihr mir helfen wollt ich würd gerne weiter erklären muss aber erstma weg morgen dann wieder<br />
UND danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728918</guid><dc:creator><![CDATA[C.Sniper]]></dc:creator><pubDate>Thu, 18 Jun 2009 15:18:12 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Fri, 19 Jun 2009 17:00:54 GMT]]></title><description><![CDATA[<p>Das ist ein c++ Problem, das hat mit Winapi nix zu tun, der Teil für den Listview schein in Ordnung zu sein. Bis auf:</p>
<pre><code class="language-cpp">lvi.cchTextMax = 300;
</code></pre>
<p>das brauchst du nur, wenn du Listviewiteminformationen ausliest, damit gibst du an wie groß der Buffer ist auf den</p>
<pre><code class="language-cpp">lvi.pszText
</code></pre>
<p>zeigt</p>
<p>Ich denke du hast dir den Querybuffer auch mal in eine Datei geschrieben, um zu sehen wie der String aufgebaut ist. Also beim Q3 Serverquery wird am Schluß nochmal ein &quot;\n&quot; angehängt, also eine Leerzeile praktisch. Da ich keinen Schimmer von c++ habe kann ich aber auch nicht sagen ob hier dein Problem liegt.</p>
<p>@help0r<br />
er will einen String parsen und nach Name, Score, Ping, etc zerlegen und mit den Daten einen Listview aktualisieren. (einfügen sieht anderst aus, falls das das Ziel ist)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729662</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729662</guid><dc:creator><![CDATA[.......]]></dc:creator><pubDate>Fri, 19 Jun 2009 17:00:54 GMT</pubDate></item><item><title><![CDATA[Reply to [c++] Cod4 rcon on Fri, 19 Jun 2009 17:14:21 GMT]]></title><description><![CDATA[<p>^^ THY an alle...<br />
Mein Problem hat sich erledigt ich hab den string einfach falsch zerlegt und es kam auch nicht der ganze string an.</p>
<p>Trotzdem nochma thx</p>
<p>PS: nur für den fall das es jemanden interessiert was zerlegt werden sollte:</p>
<p>ÿÿÿÿprint<br />
map: mp_pipeline<br />
num score ping guid name lastmsg address qport rate<br />
--- ----- ---- -------------------------------- --------------- ------- --------------------- ----- -----<br />
0 3 93 727fcaba55b4f67b68a64191053438e8 ^3CoDHQ <sup>1JD</sup>7 50 24.93.10.111:-3200 -4994 25000<br />
1 17 85 gjhhg39048ghdhngujhogugh9034zhg7 WalKing Dead 50 24.93.10.111:-3200 -4994 25000<br />
2 10 65 jdgh93h3uo4g340gh934hg934hg4h9hg |GO|Hunter 50 24.93.10.111:-3200 -4994 25000</p>
<p>so ungefähr</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729666</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729666</guid><dc:creator><![CDATA[C.Sniper]]></dc:creator><pubDate>Fri, 19 Jun 2009 17:14:21 GMT</pubDate></item></channel></rss>