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

if to switch


Post New Thread Closed Thread   
 
Thread Tools Display Modes
XSlayer
Member
Join Date: Dec 2021
Old 04-09-2022 , 21:49   Re: if to switch
#21

Quote:
Originally Posted by fysiks View Post
What in the world are you talking about? Nothing in my code was assigned a value of 0, ever. You quoted my original post so you can easily see my original post here. Nowhere in the code is there ever a value of zero assigned to anything. Not a variable or a cell.

The only thing I ever changed was the index of the gPlayerClass array from 0 to id as you can see from when you quoted my original post.

The only thing I can think of is if you're not a native english speaker or are not familiar with basic coding terminology and you're getting confused between the difference of assigning a variable/cell a value and indexing an array.

At this point, we're going to have to agree to disagree (it's already gone much farther than it needed to) and move on.
gPlayerClass[] this is your cell without assign it to nothing

gPlayerClass[0] and this is your cell assigned to 0

*i tell ur mistake*

gPlayerClass[id] now u assigned it to id


what you did when you set it to 0 is not to assign an index, it is to assign nothing, until you assigned the index to id, you have to explain it with apples it seems so in stores

and if u have doubts i will repeat it:

Quote:
Originally Posted by fysiks View Post
Code:
emit_sound(id, CHAN_ITEM, gSounds[gPlayerClass[0]], 1.0, ATTN_NORM, 0, PITCH_NORM);
Quote:
Originally Posted by fysiks View Post
Nowhere in the code is there ever a value of zero assigned to anything.
Quote:
gSounds[gPlayerClass[0]]
Quote:
gPlayerClass[0]
assing or index it your mistake is the same, simply.

Last edited by asherkin; 04-11-2022 at 04:58.
XSlayer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-09-2022 , 23:35   Re: if to switch
#22

Quote:
Originally Posted by XSlayer View Post
gPlayerClass[] this is your cell without assign it to nothing

gPlayerClass[0] and this is your cell assigned to 0

*i tell ur mistake*

gPlayerClass[id] now u assigned it to id
No, you have not assigned anything. Assignment requires you to assign a value to a variable with an equal sign (=). In other words, when you're assigning a value to a variable, you are writing to the variable. When you provide an index for an array, it's simply called indexing the array to access a particular cell in the array. When you use gPlayerClass[0] or gPlayerClass[id] without an equal sign, you are reading a particular cell in the array. You are not doing any assigning. For your assertion that I was "assigning the cell to 0" to be true, I would have had to written this:

Code:
gPlayerClass[id] = 0
__________________

Last edited by asherkin; 04-11-2022 at 04:59.
fysiks is offline
Old 04-10-2022, 02:17
XSlayer
This message has been deleted by asherkin.
Old 04-10-2022, 13:42
Black Rose
This message has been deleted by asherkin.
Old 04-10-2022, 13:45
fysiks
This message has been deleted by asherkin.
Old 04-10-2022, 16:26
XSlayer
This message has been deleted by asherkin.
Old 04-10-2022, 16:28
XSlayer
This message has been deleted by asherkin.
Old 04-10-2022, 17:21
fysiks
This message has been deleted by asherkin.
Closed Thread



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 16:46.


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