Forum

Error: prefixes to denote integers are deprecated

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Error: prefixes to denote integers are deprecated

Postby Baker » Thu Apr 23, 2015 8:20 pm

Trying to compile RQuake (download for reference) with FTEQCC and I think it worked in the past:

bprint (vip.noise2[%1]); <---- error

in function vote_action (line 103),
vote.qc:110: warning: ~ or % prefixes to denote integers are deprecated. Please use a postfix of 'i'
vote.qc:110: error: Opcode "=|LOADA_FLD" not valid for target


I don't know what %1 used to do and not sure what format it is looking for.

I'm sure this is easy, but I don't know what to do. old frikqcc 2.5 compiles it as is. Searching here + google = no dice to see if question has been answered before = no dice.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3661
Joined: Tue Mar 14, 2006 5:15 am

Re: Error: prefixes to denote integers are deprecated

Postby Spike » Thu Apr 23, 2015 10:26 pm

FTEQCC does not support QCCX syntax. it never has, it probably never will.
%5 is meant to be equivelent to 5i, although there are some other differences like fteqcc implicitly converting ints to floats as needed - which for non-constants depends upon opcode extensions.

Presumably that line can be fixed with:
bprint(substring(vip.noise2, 1, -1));
If you want to avoid extra builtin dependancies, you can also do:
local string tmp = vip.noise2;
asm ADD_F tmp 1i tmp;
bprint(tmp);
Unfortunately, the following requires opcode extensions (because its rare enough that I didn't bother trying to emulate it), but would do the same thing:
bprint(vip.noisei2 + 1);

Of course, you'll have other issues elsewhere.
Spike
 
Posts: 2878
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Error: prefixes to denote integers are deprecated

Postby Baker » Fri Apr 24, 2015 1:40 am

I thought I had a no-qccx version of it. Apparently not.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3661
Joined: Tue Mar 14, 2006 5:15 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest