Tired -,-
#1

I'm really tired, and these errors aren't making sense to me.

-- ORIGINAL PROBLEM FIXED, NEW PROBLEM --

pawn Код:
if(0 < fSpeed <= 30) color = "0x04B404FF";
        TextDrawColor(SPEEDOMETER[playerid], color);
ERROR:

Код:
error 035: argument type mismatch (argument 2)
I know WHY the error is there, but I don't know how to fix it. 'strval(color)' doesn't work either, it returns black color.
Reply
#2

You forgot the ) at the end before your semi-colon.
Reply
#3

Thats not the problem, because the 'if' statement ends after '30', then it just defines a variable.
Reply
#4

Is fSpeed a float and color NOT a string? If not, the code below should do the trick.

pawn Код:
if(0 < fSpeed < 30) color = "0x04B404FF";
Also, don't forget that you're trying to set color as a string, so make sure that it's a string and not an integer.
Reply
#5

Thanks, that works.

Problem now is, I'm trying to... ahh just look.

pawn Код:
TextDrawColor(SPEEDOMETER[playerid], strval(color));
The color comes out as black
Reply
#6

Could of done

pawn Код:
if(fSpeed >= 0 && <= 30) color = 0x04B404FF;
Try it
Reply
#7

Are you sure that the color is actually not black? Try SendClientMessage it as a debug message.

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Could of done

pawn Код:
if(fSpeed >= 0 && <= 30) color = 0x04B404FF;
Try it
Congratulations on posting after the resolution has been provided.

Note that was sarcasm and you don't deserve any form of congratulation. Especially when the method you've provided is probably more complicated. Especially when color is a string and not an integer
Reply
#8

I want to see you rage in real life and see what people respond over you Calgon, not over the net. You relise people are trying to help? You arrogant piece of shit, im not flaming anymoar.
Reply
#9

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
I want to see you rage in real life and see what people respond over you Calgon, not over the net. You relise people are trying to help? You arrogant piece of shit, im not flaming anymoar.
He was helped and needs help with another thing, you trying to post code that won't work is irrelevant to the topic and actually violates a forum rule:

Quote:

When responding to coding questions make sure your code works first.

Furthermore, I wasn't raging, and I don't rage over small things over the internet, it's clearly you who is upset due to the fact that you can't understand sarcasm and thinks that they are the inverse of inferior by posting code that doesn't even work.

It's you who is raging and name-calling.
Reply
#10

Small thing dont mean you need to go complain over, i just said to test it, im sure i dont have his script to test it idiot, now use the PM button to me and complain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)