Raised This Month: $ Target: $400
 0% 

Quick and nooby question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-13-2016 , 00:18   Quick and nooby question
Reply With Quote #1

A quick and nooby question:

Wich should be first, size or id?

PHP Code:
new g_IdMessage[129][33
PHP Code:
g_IdMessage[0][id
-----------------------------------
PHP Code:
new g_IdMessage[33][129
PHP Code:
g_IdMessage[id][0
Syturi0 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-13-2016 , 00:47   Re: Quick and nooby question
Reply With Quote #2

id
siriusmd99 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-13-2016 , 00:58   Re: Quick and nooby question
Reply With Quote #3

Quote:
Originally Posted by siriusmd99 View Post
id
On new its size first and id second.
On outher stuff like:
PHP Code:
if(g_IdMessage... 
its actualy id first and size second... so strange

Last edited by Syturi0; 04-13-2016 at 00:58.
Syturi0 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-13-2016 , 06:59   Re: Quick and nooby question
Reply With Quote #4

No, it's not.

new g_szMessage[33][128] - id is first, size is second
if(equal(g_szMessage[id], "bla bla")) - you only use id here
if(g_szMessage[id][0]) - id is first, the character is second

I don't see where they are used the other way around.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-13-2016 , 07:36   Re: Quick and nooby question
Reply With Quote #5

new array[33][64] means that all 32 players (33 - 1, because there shall be 1 cell free, the 33th cell) have a string with maximum length 63 characters(64-1)

for example array[1] = "hello"
array[2] = "watsup" and so on

you can't place string first and second players.

If you put array[64][33] then you will have 1 string and every value of the every cell of it will have 32 cells. I can't explain next ...
siriusmd99 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-13-2016 , 13:36   Re: Quick and nooby question
Reply With Quote #6

I just tested this like 4 times already.

On new its size first and id second.
On outher stuff like:
PHP Code:
if(g_IdMessage... 
its actualy id first and size second.

Last edited by Syturi0; 04-13-2016 at 13:38.
Syturi0 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-13-2016 , 14:00   Re: Quick and nooby question
Reply With Quote #7

new g_IdMessage[33][129]

32 players have one string with length 128.
siriusmd99 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-13-2016 , 14:07   Re: Quick and nooby question
Reply With Quote #8

Show us your code, you are certainly doing something wrong. "On other stuff like..." isn't enough.
klippy is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-13-2016 , 14:13   Re: Quick and nooby question
Reply With Quote #9

Quote:
Originally Posted by KliPPy View Post
Show us your code, you are certainly doing something wrong. "On other stuff like..." isn't enough.
Spoiler


Something like this ^

If i use "new g_Chat_FinalMessage" with id first and size second then the message will only have 32 characters...
Syturi0 is offline
Old 04-13-2016, 18:17
Depresie
This message has been deleted by Depresie. Reason: nvm
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-13-2016 , 18:18   Re: Quick and nooby question
Reply With Quote #10

Quote:
Originally Posted by Depresie View Post
I don't want to be rude, and i dont know about size and buffers.. i might not be right, but this looks wrong
PHP Code:
new szTexto[250
How come?
Syturi0 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 18:38.


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