Posts: 1,046
Threads: 29
Joined: Mar 2010
21.11.2011, 17:24
(
Последний раз редактировалось BigETI; 21.11.2011 в 21:39.
)
Quote:
Originally Posted by Finn
This doesn't even work?
TIMING FOR STRCMP:
Код:
[20:21:02] TIME: 1059 BOOYAKA: 1000000
TIMING FOR BTXT:
Booyaka is zero, which means the whole function wasn't even called.
Код:
[20:22:36] TIME: 44 BOOYAKA: 0
Here's my testing script:
pawn Код:
#include <a_samp> new booyakabooyaka;
#include <btxt> TEXT:hello(playerid, params[]) { booyakabooyaka++; return 1; }
public OnPlayerText(playerid, text[]) { return 1; }
/*public OnPlayerText(playerid, text[]) { if(!strcmp("hello", text, true)) { booyakabooyaka++; } return 1; }*/
main() { print("\n----------------------------------"); print(" Bare Script\n"); print("----------------------------------\n"); return 1; }
public OnGameModeInit() { new check1 = GetTickCount();
for(new i; i < 1000000; i++) { OnPlayerText(0, "hello"); }
new check2 = GetTickCount();
printf("TIME: %d BOOYAKA: %d", check2-check1, booyakabooyaka); return 1; }
|
You are doing it wrong. You can't use
pawn Код:
OnPlayerText(0, "hello");
as function.
Use
pawn Код:
CallLocalFunction("OnPlayerText", "ds", 0, "hello");
instead.
Anyways you are free to use my benchmark scripts which are downloadable from a file hoster and are posted in the main post.
Quote:
Originally Posted by Kerlan
:/ video??
|
Of?