AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help here please :) (https://forums.alliedmods.net/showthread.php?t=121328)

Shadezz 03-14-2010 12:55

Help here please :)
 
Fixed thanks to Wrecked&fysiks

EDIT; please just trash this again as its fixed.

wrecked_ 03-14-2010 12:58

Re: Help here please :)
 
When you declare AddValue, you need to do it like
PHP Code:

new Float:AddValue
// not
new AddValue 

You also need to prefix AddValue with float: in most of those.

Shadezz 03-14-2010 13:04

Re: Help here please :)
 
then i just get this:

/home/groups/amxmodx/tmp3/phpKW8Ygv.sma(1581) : error 021: symbol already defined: "AddValue"
/home/groups/amxmodx/tmp3/phpKW8Ygv.sma(1581) : error 008: must be a constant expression; assumed zero
/home/groups/amxmodx/tmp3/phpKW8Ygv.sma(1581) : error 036: empty statement
/home/groups/amxmodx/tmp3/phpKW8Ygv.sma(1581) : fatal error 107: too many error messages on one line

wrecked_ 03-14-2010 13:06

Re: Help here please :)
 
No I meant REPLACE your previous declaration with the first option.

You should ONLY have
PHP Code:

new Float:AddValue 


Hviideren 03-14-2010 13:13

Re: Help here please :)
 
Like this?
PHP Code:

new Float:AddValue[id] = str_to_float(property) + playerMoney[id]; 


wrecked_ 03-14-2010 13:16

Re: Help here please :)
 
You'd want to make it
PHP Code:

new Float:AddValue[33]

// or
new Float:AddValue[MAX_PLAYERS+1

and then index the array after.

Hviideren 03-14-2010 13:31

Re: Help here please :)
 
I dont know what you mean :oops:

Shadezz 03-14-2010 13:33

Re: Help here please :)
 
i srsly have no idea what u mean XD could u post how its supposed to be standing? like right now i tried with:
new Float:AddValue[MAX_PLAYERS+1] = str_to_float(property) + playerMoney[id];

i srsly dont know what u mean :/

wrecked_ 03-14-2010 13:35

Re: Help here please :)
 
PHP Code:

new Float:AddValue[33]
Float:AddValue[id] = str_to_float(property) + playerMoney[id]; 


fysiks 03-14-2010 13:37

Re: Help here please :)
 
Wow, this is sad.

Find the line in your code like this:

PHP Code:

new AddValue[33

then change it to:

PHP Code:

new Float:AddValue[33

Similarly with g_money_used[33] you probably need to add bool:

Quote:

Originally Posted by wrecked_ (Post 1117269)
PHP Code:

new Float:AddValue[33]
Float:AddValue[id] = str_to_float(property) + playerMoney[id]; 


You shouldn't need to retag the variable AddValue

Oh, and playerMoney should be a Float also.


All times are GMT -4. The time now is 08:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.