Raised This Month: $12 Target: $400
 3% 

Why is this causing an error?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dilalmon
AlliedModders Donor
Join Date: Apr 2013
Old 02-22-2014 , 18:26   Why is this causing an error?
Reply With Quote #1

Code:
#define NUM_TYPES 11

enum Item
{
    ItemID,
    String:ItemName[255],
    String:ItemCommands[1024],
    ItemSystemCode
}


new items[NUM_TYPES][512][Item];
new itemCount[NUM_TYPES];

SQL_FetchString(hQuery, 1, item[type][itemCount[type]][ItemName], 255);
Compile error: Expected token: "]", but found "-identifier-".

I can't seem to grasp what's wrong with the code.
dilalmon is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-22-2014 , 19:17   Re: Why is this causing an error?
Reply With Quote #2

Quote:
Originally Posted by dilalmon View Post
Code:
#define NUM_TYPES 11

enum Item
{
    ItemID,
    String:ItemName[255],
    String:ItemCommands[1024],
    ItemSystemCode
}


new items[NUM_TYPES][512][Item];
new itemCount[NUM_TYPES];

SQL_FetchString(hQuery, 1, items[type][itemCount[type]][ItemName], 255);
Compile error: Expected token: "]", but found "-identifier-".

I can't seem to grasp what's wrong with the code.
Bacardi is offline
dilalmon
AlliedModders Donor
Join Date: Apr 2013
Old 02-23-2014 , 17:14   Re: Why is this causing an error?
Reply With Quote #3

I'm so dumb. Thank you so much.
dilalmon 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 08:07.


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