Logo

A creating theme question for SM5 (SOLVED)

Register Log In Back To Forums

Post #1 · Posted at 2013-11-06 04:38:41pm 10.3 years ago

Offline zGHRs
zGHRs Avatar Member
36 Posts
China
Reg. 2013-07-01


Last updated: 2013-11-19 02:35pm
Like of selecting music photo of below (The Menu Elements Style Icon):
(In The blue squared area)
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/2013-11-06_120816.jpg
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/2013-11-06_120748.jpg
But I don't want to like this. I want to make the menu elements style icon to be different in single but different Game Compatible Modes (Like the photos of below, blue squared area)
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/2013-11-06_120816.jpg
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/2013-11-06_120817.jpg
PS: I've been draw on the experience of DDR 5th. Mix theme for SM5 in this theme. I want to use two photos to show in different Game Compatible Modes. However, this problem just a failure told that "There's more than a ..." in selecting music. I just used the lua code. But it told that "LUA runtime error: <eof> is expected" error. How can I fix this error, and also become the menu elements style icon to be different in single but different Game Compatible Modes? (Like of the third and the fourth photos on above)

[PS: This problem I've hard to explain it clearly because that was a difficult problem.]


The code just at here:
Quote

local si;

local sg = GAMESTATE:GetCurrentGame():GetName();
local Modes =
{
dance = "Single,Double,Solo,Versus,Couple",
pump = "Single,Double,HalfDouble,Versus,Couple",
beat = "5Keys,7Keys,10Keys,14Keys",
kb7 = "KB7",
para = "Single",
techno = "Single4,Single5,Single8,Double4,Double8",
lights = "Single"
}
return Modes[sGame]

if sg == "dance" then
si = "SINGL4";
else if sg == "pump" then
si = "SINGL5";
end

local t=Def.ActorFrame{};
t[#t+1] = LoadActor(THEME:GetPathG("ScreenWithMenuElements","StyleIcon/"..si));

return t;

The prompt just told "LUA runtime error: <eof> is expected" error.
I'm embarassing. Where had the error taken place? can you figured out?

Post #2 · Posted at 2013-11-06 08:53:10pm 10.3 years ago

Offline AJ 187
AJ 187 Avatar Member
130 Posts
Not Set
Reg. 2008-10-14

"retired"
It turns out you have two return statements; everything below "return Modes[sGame]" doesn't get executed.

Remove this part of the code and see what happens:
local Modes =
{
dance = "Single,Double,Solo,Versus,Couple",
pump = "Single,Double,HalfDouble,Versus,Couple",
beat = "5Keys,7Keys,10Keys,14Keys",
kb7 = "KB7",
para = "Single",
techno = "Single4,Single5,Single8,Double4,Double8",
lights = "Single"
}
return Modes[sGame]

Post #3 · Posted at 2013-11-06 09:41:43pm 10.3 years ago

Offline razorblade
razorblade Avatar Member
1,099 Posts
Not Set
Reg. 2011-03-01


Last updated: 2013-11-06 10:04pm
try this one (click the link below):

assuming that si is any sprite image, there should be "dance 1x5.png" and "pump 1x6.png" files (for example) inside Graphics/ScreenWithMenuElements StyleIcon folder.

http://codepad.org/YMy1203k (edited)

Post #4 · Posted at 2013-11-07 08:45:25am 10.3 years ago

Offline zGHRs
zGHRs Avatar Member
36 Posts
China
Reg. 2013-07-01


Last updated: 2013-11-07 08:45am
Quote: AJ 187
It turns out you have two return statements; everything below "return Modes[sGame]" doesn't get executed.

Remove this part of the code and see what happens:
local Modes =
{
dance = "Single,Double,Solo,Versus,Couple",
pump = "Single,Double,HalfDouble,Versus,Couple",
beat = "5Keys,7Keys,10Keys,14Keys",
kb7 = "KB7",
para = "Single",
techno = "Single4,Single5,Single8,Double4,Double8",
lights = "Single"
}
return Modes[sGame]

I've been removed these codes. However, it remains happenning that error the same:
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/nm.jpg

Quote: razorblade
try this one (click the link below):

assuming that si is any sprite image, there should be "dance 1x5.png" and "pump 1x6.png" files (for example) inside Graphics/ScreenWithMenuElements StyleIcon folder.

http://codepad.org/YMy1203k (edited)

I tried for this code, this code can be run it normally. However, the style icon cannot reach to the current style.
It told for the wrong style.
Like I have used 1P for entrance into the dance-single mode, But the style icon shown the dance-double mode.
And also like: I have used 2P for entrance into the dance-single mode, The style icon just show the 1P place, not 2P place.

Post #5 · Posted at 2013-11-07 03:28:18pm 10.3 years ago

Offline AJ 187
AJ 187 Avatar Member
130 Posts
Not Set
Reg. 2008-10-14

"retired"
Quote: zGHRs
I've been removed these codes. However, it remains happenning that error the same:
http://i482.photobucket.com/albums/rr190/HUGO_FUKT/nm.jpg

that's what I get for not actually trying to fix it ;)

Upon closer inspection, it looks like you're using "else if" instead of the correct "elseif". Simple error, but tricky. I catch myself doing it sometimes too.

local si;

local sg = GAMESTATE:GetCurrentGame():GetName();

if sg == "dance" then
si = "SINGL4";
-- xxx: "else if" instead of "elseif"
--else if sg == "pump" then
elseif sg == "pump" then
si = "SINGL5";
end

local t=Def.ActorFrame{};
t[#t+1] = LoadActor(THEME:GetPathG("ScreenWithMenuElements","StyleIcon/"..si));

return t;


I'll be able to help you further if you include a list of what files point to what game+stepstype combinations. A list of available StepsTypes can be found here (search for "StepsType" and open it up with the +).

Post #6 · Posted at 2013-11-07 08:02:14pm 10.3 years ago

Offline razorblade
razorblade Avatar Member
1,099 Posts
Not Set
Reg. 2011-03-01


Last updated: 2013-11-07 08:02pm
Quote: zGHRs
I tried for this code, this code can be run it normally. However, the style icon cannot reach to the current style.
It told for the wrong style.

actually if you see the order of the sprite from the link, they are displayed as the following:

dance 1x5.png
- single
- double
- solo
- versus
- couple

pump 1x6.png
- single
- double
- halfdouble
- versus
- couple
- routine

you might edit the sprite image to display them correctly, or edit the LUA yourself based on your preferred sprite's ordering.

Post #7 · Posted at 2013-11-23 06:41:25am 10.3 years ago

Offline zGHRs
zGHRs Avatar Member
36 Posts
China
Reg. 2013-07-01

Thanks for AJ187, With your help, this problem I've been solved.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 5% · Database: 4% · Server Time: 2024-03-29 05:50:04
This page took 0.008 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language