Too Many Variables?
#1

Hello all,
I'm encountering a strange kind of bug with my code.

Code:
Код:
new Float:sx,Float:sy,Float:sz;
new Float:p_money;

sscanf(qry,"p|iifiiifff",
pStats[playerid][atype],
pStats[playerid][faction],
p_money,
pStats[playerid][v1],
pStats[playerid][v2],
pStats[playerid][kills],
sx,
sy,
sz);
Note: Money is meant to be a float, I'm using decimal currency.

Anyway, when I change "new p_money;" to "new Float:p_money;", the compiler crashes when I press compile.

Even more strangely, it compiles fine when I use the "-r" parameter while compiling (Using pawn.cfg to specify parameters, as mentioned here).

Can anybody help me?

Thanks in advance,
JonRB
Reply
#2

Update:
I have just found that this problem isn't limited to just that script - A lot of my scripts now have issues with the compiler. It seems to happen when I add a variable but I'm sure there are plenty of other reasons for which it would stop working. Thankfully using the '-r' parameter still produces a valid script.
Reply
#3

idk .. maybe im being blonde
pawn Код:
#inlcude <float>
Reply
#4

Quote:
Originally Posted by spd_sahil
Посмотреть сообщение
idk .. maybe im being blonde
pawn Код:
#inlcude <float>
That is already 'done' when you include the a_samp.inc file. Aside from that, the original issue, seems strange. I'm glad the OP has found a solution though! (Though, that doesn't explain why he had issues in the first place...)
Reply
#5

I wouldn't really call it a solution, more of a substitute.
If anybody knows why (****** probably does...) I would really appreciate the help!

I found that it's seemingly random - I can add an entire new function and it works fine, but one change in variable type somewhere else and the compiler goes wrong - even with my 'fix'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)