gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
find the issue why instead of put ProjectId variable it puts it name in line: <data…
- User
find the issue why instead of put ProjectId variable it puts it name in line:
<androidManifestUpdates> <loopElements tag="activity"> <setStringFromAttribute result="activityName" tag="$" name="android:name"/> <setBoolIsEqual result="bGameActivityUE4" arg1="$S(activityName)" arg2="com.epicgames.ue4.GameActivity"/> <setBoolIsEqual result="bGameActivityUE5" arg1="$S(activityName)" arg2="com.epicgames.unreal.GameActivity"/> <setBoolOr result="bGameActivity" arg1="$B(bGameActivityUE4)" arg2="$B(bGameActivityUE5)"/> <if condition="bGameActivity"> <true> <addElements tag="$"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="$S(ProjectId)" /> </intent-filter> </addElements> </true> </if> </loopElements> </androidManifestUpdates> - Assistant
The issue in the provided code is that the variable "ProjectId" is not being replaced with its value in the line
<data android:scheme="$S(ProjectId)" />. Instead, it simply uses the string "ProjectId" as the value for the "scheme" attribute.To resolve this issue, you need to make sure that the actual value of the "ProjectId" variable is used in the "android:scheme" attribute. Here's an updated version of the code:
<init> <setStringFromProperty result="ProjectId" ini="Game" section="/Script/ReadyGamesNetwork.ReadyGamesNetworkSettings" property="ProjectId" default=""/> <log text="$S(ProjectId)"/> <log text="ReadyGamesNetwork SDK Android Initialization"/> </init> <androidManifestUpdates> <loopElements tag="activity"> <setStringFromAttribute result="activityName" tag="$" name="android:name"/> <setBoolIsEqual result="bGameActivityUE4" arg1="$S(activityName)" arg2="com.epicgames.ue4.GameActivity"/> <setBoolIsEqual result="bGameActivityUE5" arg1="$S(activityName)" arg2="com.epicgames.unreal.GameActivity"/> <setBoolOr result="bGameActivity" arg1="$B(bGameActivityUE4)" arg2="$B(bGameActivityUE5)"/> <if condition="bGameActivity"> <true> <addElements tag="$"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="$V(ProjectId)" /> </intent-filter> </addElements> </true> </if> </loopElements> </androidManifestUpdates>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.