Tired -,- - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tired -,- (
/showthread.php?tid=215730)
Tired -,- -
Antonio [G-RP] - 24.01.2011
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.
Re: Tired -,- -
Sway - 24.01.2011
You forgot the ) at the end before your semi-colon.
Re: Tired -,- -
Antonio [G-RP] - 24.01.2011
Thats not the problem, because the 'if' statement ends after '30', then it just defines a variable.
Re: Tired -,- -
Calgon - 24.01.2011
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.
Re: Tired -,- -
Antonio [G-RP] - 24.01.2011
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
Re: Tired -,- -
Lorenc_ - 24.01.2011
Could of done
pawn Код:
if(fSpeed >= 0 && <= 30) color = 0x04B404FF;
Try it
Re: Tired -,- -
Calgon - 24.01.2011
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
Re: Tired -,- -
Lorenc_ - 24.01.2011
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.
Re: Tired -,- -
Calgon - 24.01.2011
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.
Re: Tired -,- -
Lorenc_ - 24.01.2011
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.