Comments (12)
I'm not certain what the cause is, it might either be PAWN specific, y_hashmap limitaton, or something completely different. I don't have much time lately, so I'm not certain if I'll get around to it. Also, do you know if this bug was present in YSI 3?
from ysi-includes.
Found it: This is the root cause.
from ysi-includes.
I don't actually think that's the root cause. I've only had a quick glance since I'm trying to help less and just encourage others to get to know the code, but looking at it this is my fault. "Command_AddAlt" hashes the string (using bernstein, that comment you highlighted only applies for compile-time string hashes and the first character of a string at run-time), but "Command_ReProcess" does a slightly different hash. It converts:
rádióhangolás
To:
rdihangols@s4ai1u
Using standard punycode, but with "@" instead of "-", while hashing that result. So "Command_AddAlt" needs to do that encoding instead. This is because y_commands has a feature so secret that even I forgot about it! You can declare commands with punycode:
YCMD:rdihangols@s4ai1u(playerid, params[], help)
{
}
Is equivalent to:
YCMD:rádióhangolás(playerid, params[], help)
{
}
But will compile.
from ysi-includes.
There are punycode converters online, but most will prefix the result with "xn--" and separate the two parts with "-", because that is how they are used in internationalised domain names.
from ysi-includes.
Welp, I'm wrong again. Being puny human ain't easy. So, applying Puny_EncodeHash
into addalt is the way to go?
from ysi-includes.
Probably, as I said that was just a cursory glance.
from ysi-includes.
Hello again, i tested with This version of YSI and now works.
from ysi-includes.
Ok, just keep in mind that master is 3, and there are many improvements in 4 (though as we can see with occasional bugs). Keep an eye on this issue, and upgrade when we resolve this.
from ysi-includes.
Ok, i wait for updates, and thanks for the help :)
from ysi-includes.
something? ❓
from ysi-includes.
Well, I tried a lot of stuff today, but I can't seem to get it working properly. One major problem is with Command_Find
, as from simple hashmap lookup it went to
foreign Command_Find(string:cmd[]);
global Command_Find(string:cmd[])
{
static
sCmd[64] = "",
sHash;
Puny_EncodeHash(sCmd, cmd, sHash, .delimiter = '@');
return HashMap_GetWithHash(YSI_g_sCommandMap, sCmd, sHash);
}
This is not something we want for every command lookup (performance wise). I'll fiddle with it some more tommorow, maybe I've overlooked something.
from ysi-includes.
Ok, tests pass so I guess Misiur@e0a9051 solves this for you. In case performance deteriorates too much we'll have to think more about this.
from ysi-includes.
Related Issues (20)
- I found a problem in y_inline_bcrypt. HOT 2
- YSI_Coding\y_timers\..\..\YSI_Core\y_core\y_scriptinit_impl.inc(434) : fatal error 111: user error: defined OnScriptInit HOT 1
- va_args stopped working after update HOT 6
- What does callbackfix.amx do? HOT 1
- (error) undefined symbol "Dialog_ShowPlayerNative HOT 2
- Error when using y_commands HOT 1
- Error when updating YSI HOT 2
- Long callback execution detected (hang or performance issue) or DDoS Attack HOT 1
- Issues with using y_iterator HOT 1
- y_inline_timers calling the timer function twice HOT 1
- AMX Size HOT 1
- Can't include y_races
- error complil HOT 1
- Y_Hooks not called with 3.10.11 Compiler and Open.MP HOT 2
- y_functional_funcs.inc(1154) : error 017: undefined symbol "j"
- bcrypt_delete File or function is not found since last YSI Update. HOT 4
- \pawno\include\YSI_Data\y_foreach\y_foreach_entry.inc(137) : fatal error 111: user error: Old <foreach.inc> found - delete it.
- Unable to compile with y_zonenames and y_races
- pawn.cc crashes when i use the last version of ysi includes
- helpp me YSI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ysi-includes.