Raised This Month: $32 Target: $400
 8% 

PrintToServer not working with 2-d arrays?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. Jekyll
Member
Join Date: Sep 2015
Old 10-22-2015 , 23:23   PrintToServer not working with 2-d arrays?
Reply With Quote #1

Code:

Quote:
PrintToServer("%d", hasMaxBuildingLevel[client][0]);
Error:

Quote:
error 001: expected token: ",", but found "["
Am I doing something wrong or does PrintToServer just not work with 2d arrays?
Dr. Jekyll is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-22-2015 , 23:31   Re: PrintToServer not working with 2-d arrays?
Reply With Quote #2

Wild guess, your array name not match like case sensitive
hasMaxBuildingLevel


*edit
or you have some typo before this line.
__________________
Do not Private Message @me

Last edited by Bacardi; 10-22-2015 at 23:33.
Bacardi is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 10-22-2015 , 23:52   Re: PrintToServer not working with 2-d arrays?
Reply With Quote #3

how are you passing client?
__________________
8guawong is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 10-23-2015 , 09:50   Re: PrintToServer not working with 2-d arrays?
Reply With Quote #4

Show the full function code (not plugin, but function).

It's likely you screwed up at an earlier line, and that error spiraled itself down to that line.

Also show how you initialized that array.
Potato Uno is offline
Dr. Jekyll
Member
Join Date: Sep 2015
Old 10-24-2015 , 23:59   Re: PrintToServer not working with 2-d arrays?
Reply With Quote #5

Quote:
Originally Posted by Potato Uno View Post
Show the full function code (not plugin, but function).

It's likely you screwed up at an earlier line, and that error spiraled itself down to that line.

Also show how you initialized that array.
I found the error. I was using the wrong variable name

This is what happens when I try to code on 4 hours of sleep.
Dr. Jekyll 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:32.


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