2016-01-17 64 views
0

在一個名爲Garry's mod的遊戲中,有一個叫做wiremod的加法。 wiremod裏面有表達式2,它是一個基於編碼所以執行命令的命令。命令For循環我遇到了問題,因爲我無法在變量內部執行變量。在CMD中,我可以設置本地EnableLocalExtension並執行!Var%Var%! 簡單的代碼是:(帽子敏感)Garry's mod表達式2 for循環

@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity 
X = 64 
Y = 24 

-N is the variable 
-10 is max number 
-1 is how much it increments by 
for(N,10,1) 
{ 
Menu:egpText(1,toString(GoCart1),vec2(X,Y) 
Y+=24 -increase by 24 
I++ -increase by 1 
} 

我的問題是我無法改變GoCart1到GoCart2,GoCart3 ... Ect的 試過GoCartN但給我一個錯誤GoCartN不存在 任何人有任何想法?

回答

0

簡短的回答我要分開代碼

@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity 
X = 64 
Y = 24 
T = table(GoCart1,GoCart2,GoCart3,GoCart4) 
for(N,10,1) 
{ 
Menu:egpText(1,"1. "+toString(T[N,entity]),vec2(X,Y) 
Y+=24 -increase by 24 
I++ -increase by 1 
} 

如果有人知道如何把GOCART在環路請讓我知道