Raised This Month: $ Target: $400
 0% 

"Menu" dont works


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-25-2014 , 16:05   Re: "Menu" dont works
Reply With Quote #1

Next time please tell us the error so people that want to help you don't have to guess.

If your array is 32 large it only fits 31 characters because you need to include the null terminator at the end of the string. You need to use 31 and 1 as your array size parameters for get_user_name and num_to_str (and the temp2 array is therefore too small to hold your double digit integers). Please use the charsmax macro to avoid simple mistakes like this in the future:

PHP Code:
get_user_name(i,temp1charsmax(temp1));         
num_to_str(i,temp2charsmax(temp2)); 
charsmax(variable) expands to sizeof(variable)-1 and will always give you the correct integer to pass into string handling functions.
__________________
In Flames we trust!
Nextra is offline
Reply



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 21:05.


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