Raised This Month: $ Target: $400
 0% 

Array Help..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 06-03-2007 , 20:58   Array Help..
Reply With Quote #1

Error is with line
PHP Code:
g_AdList[g_adAmount] = parsedad 
ERROR: Error: Must be assigned to an array on line 31
PHP Code:
#define maxstuff 256

new g_AdList[maxstuff]

public 
load()
{
    new 
readdata[128],steamid[32],txtlenparsedad[256]
    
    new 
g_adAmount 0
    
while(!read_file(filename,g_adAmount++,readdata,127,txtlen))
    {
        
parse(filename,parsedad,sizeof(parsedad))
        
g_AdList[g_adAmount] = parsedad
    
}

PS: I'm sorry hawlk for what I said on aim
Styles is offline
Send a message via AIM to Styles
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-03-2007 , 22:18   Re: Array Help..
Reply With Quote #2

You can't copy a string by this way.

Try to use copy() or format(ex)() .

Maybe like : formatex( g_AdList[g_adAmount], maxstuff - 1, parsedad );
__________________
Arkshine is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 06-03-2007 , 22:38   Re: Array Help..
Reply With Quote #3

o wow thank you very much1
Styles is offline
Send a message via AIM to Styles
VEN
Veteran Member
Join Date: Jan 2005
Old 06-06-2007 , 12:24   Re: Array Help..
Reply With Quote #4

Note: this would be valid:
Quote:
new array1[256]
new array2[256]
array2 = array1
because number of arrays' elements is the same.
VEN 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 10:37.


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