Here's the code from plugin_init() inside the nextmap.sma:
Quote:
new szString[32], szString2[32], szString3[8]
get_localinfo("lastmapcycle", szString, 31)
parse(szString, szString2, 31, szString3, 7)
g_pos = str_to_num(szString3)
get_cvar_string("mapcyclefile", g_mapCycle, 31)
if (!equal(g_mapCycle, szString2))
g_pos = 0 // mapcyclefile has been changed - go from first
readMapCycle(g_mapCycle, g_nextMap, 31)
set_cvar_string("amx_nextmap", g_nextMap)
format(szString3, 31, "%s %d", g_mapCycle, g_pos) // save lastmapcycle settings
set_localinfo("lastmapcycle", szString3)
|
The
szString3 variable is defined with
8 cells but in the lower code is formated as
31 characters... and the weird thing is, the plugin compiles and works fine, it doesn't report any kind of errors what-so-ever... WHY ? O.o
I also needed that code for something else and tried to replace the variables exacly, but in my case, the server returns "Runtime error 5: memory usage" or something like that... O.o
Can someone explain this, I'm really confused =)
__________________