Expression has no effect?!?!!?
#1

Код:
tintelekt + PlayerInfo[killerid][intelekt];
tsila + PlayerInfo[killerid][sila];
?! What does mean Expression has no effect?
Reply
#2

It means it does nothing. You add two things together but the result of that calculation isn't saved anywhere.
Reply
#3

Код:
new tintelekt = random(110);
new tsila = random(80);
tintelekt + PlayerInfo[killerid][intelekt];
tsila + PlayerInfo[killerid][sila];
I want to give random points? how do i make it? can u help?
Reply
#4

Quote:
Originally Posted by Stoyanov
Посмотреть сообщение
Код:
new tintelekt = random(110);
new tsila = random(80);
tintelekt + PlayerInfo[killerid][intelekt];
tsila + PlayerInfo[killerid][sila];
I want to give random points? how do i make it? can u help?
You have to assign the result of both expressions somewhere or it ll be lost. It seems you want to use those two variables like this.

Код:
tintelekt = tintelekt + PlayerInfo[killerid][intelekt];
tsila = tsila + PlayerInfo[killerid][sila];
Reply
#5

pawn Код:
// Method 1
a = a + b;

//Method 2
a += b;
This is how you add the value of b to variable a. Both methods do the same thing. To make it more clear, what you're doing right now is "b + a". You're not setting the result to any variable.
Reply
#6

Quote:
Originally Posted by kirk
Посмотреть сообщение
You have to assign the result of both expressions somewhere or it ll be lost. It seems you want to use those two variables like this.

Код:
tintelekt = tintelekt + PlayerInfo[killerid][intelekt];
tsila = tsila + PlayerInfo[killerid][sila];
Quote:
Originally Posted by HazardouS
Посмотреть сообщение
pawn Код:
// Method 1
a = a + b;

//Method 2
a += b;
This is how you add the value of b to variable a. Both methods do the same thing. To make it more clear, what you're doing right now is "b + a". You're not setting the result to any variable.
Thanks guys. REP +
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)