Raised This Month: $ Target: $400
 0% 

Different size usage in nextmap.sma


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-01-2009 , 13:57   Different size usage in nextmap.sma
Reply With Quote #1

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 =)
__________________
Hunter-Digital is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode