Status
Not open for further replies.

Xyonel

Indie Developer, All-in-one artist.
Veteran
Joined
Jul 22, 2018
Messages
183
Reaction score
37
First Language
Italian
Primarily Uses
RMMV
I got errors with this formula and don't know why.
I checked multiple times and tweaked in different manner but still not works.
the variables are additional parameters as variable which allow me to implement a scaling addition to base param.
just tell me if something is wrong with this formula..


(base + plus + (if (user.actorId == 1) v[42]*Math.sqrt(v[42]); elsif (user.actorId == 2) (v[52]*Math.sqrt(v[52]))*2/3; elsif (user.actorId == 3) (v[62]*Math.sqrt(v[62]))*4/3; elsif (user.actorId == 4) (v[72]*Math.sqrt(v[72]))*2/3; elsif (user.actorId == 5) (v[82]*Math.sqrt(v[82]))*2/3; elsif (user.actorId == 6) (v[92]*Math.sqrt(v[92]))*2/3; elsif (user.actorId == 7) v[102]*Math.sqrt(v[102]); end)) * paramRate * buffRate + flat
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
941
Reaction score
588
First Language
English
Primarily Uses
RMMV
I got errors with this formula and don't know why.
I checked multiple times and tweaked in different manner but still not works.
the variables are additional parameters as variable which allow me to implement a scaling addition to base param.
just tell me if something is wrong with this formula..


(base + plus + (if (user.actorId == 1) v[42]*Math.sqrt(v[42]); elsif (user.actorId == 2) (v[52]*Math.sqrt(v[52]))*2/3; elsif (user.actorId == 3) (v[62]*Math.sqrt(v[62]))*4/3; elsif (user.actorId == 4) (v[72]*Math.sqrt(v[72]))*2/3; elsif (user.actorId == 5) (v[82]*Math.sqrt(v[82]))*2/3; elsif (user.actorId == 6) (v[92]*Math.sqrt(v[92]))*2/3; elsif (user.actorId == 7) v[102]*Math.sqrt(v[102]); end)) * paramRate * buffRate + flat
Well without knowing what the error you're actually getting is, it's gonna be real hard to diagnose this for you. I am immediately seeing that instead of using 'else if' you're using 'elsif' which is incorrect and is likely to cause a problem, though if that is the only problem that is caused I can't be sure.
 

Xyonel

Indie Developer, All-in-one artist.
Veteran
Joined
Jul 22, 2018
Messages
183
Reaction score
37
First Language
Italian
Primarily Uses
RMMV
i found in different posts online that in formula the else if is truncated in elsif, btw in the console there isn't any error, just a warning and a citation of the wrong formula.

edit: even with else if doesn't work. and this is the only error message i get " CUSTOM PARAM FORMULA ERROR"

ok additional error info :
YEP_EventTimerControl.js:387 SyntaxError: Unexpected token if
at Game_Actor.Game_BattlerBase.param (YEP_BaseParamControl.js:681)
at Game_Actor.Game_BattlerBase.param (YEP_StatAllocation.js:859)
at Game_Actor.get (rpg_objects.js:2133)
at Game_Actor.Game_BattlerBase.recoverAll (rpg_objects.js:2621)
at Game_Actor.Game_BattlerBase.recoverAll (YEP_BattleEngineCore.js:3569)
at Game_Actor.initEquips (YEP_EquipCore.js:408)
at Game_Actor.setup (rpg_objects.js:3443)
at Game_Actor.setup (YEP_BaseParamControl.js:1041)
at Game_Actor.setup (YEP_ClassChangeCore.js:586)
at Game_Actor.setup (YEP_X_Subclass.js:793)




EDIT:

I got this error with this formula: (user.actorId() === 1) ? v[41]+1:22

YEP_CoreEngine.js:1098 TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
at Bitmap.gradientFillRect (rpg_core.js:1289)
at Bitmap.gradientFillRect (YEP_CoreEngine.js:1014)
at Window_MenuStatus.Window_Base.drawGauge (YEP_CoreEngine.js:2418)
at Window_MenuStatus.Window_Base.drawGauge (YEP_SectionedGauges.js:170)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_AbsorptionBarrier.js:1417)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_SkillCore.js:1190)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_X_SkillCostItems.js:903)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_SectionedGauges.js:142)
at Window_MenuStatus.Window_Base.drawActorSimpleStatus (YEP_CoreEngine.js:2478)
at Window_MenuStatus.Window_Base.drawActorSimpleStatus (YEP_JobPoints.js:671)


i tried without variable and it works, so there's a problem with variables used inside this formula inside the yep plugin, if someone knows why just share, thanks
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,743
Reaction score
5,766
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Artists out there, is there something RPG maker related you wish your graphics software had but doesn't? (Something like automatically transform a wall tile into a cylindrical tower). I want to give a boost to WecTools, but I'm dry of ideas right now...
having anxiety during all this virus stuff is the absolute worst. I'm the only one missing out on my friend's wedding in Sept. because I can't be in large groups of people anymore due to anxiety.
Well... I just spent most of the day making something I cant even use xD

Hero_1.png
The idea was to look at the original but at a medium distance.
In hindsight, I might as well have just edited the original lol... I didn't intend for it to end up so similar.
does anyone else feel tired after completing a sprite?

Forum statistics

Threads
113,906
Messages
1,078,338
Members
148,011
Latest member
minh0408
Top